Sfoglia il codice sorgente

fix(klarstein_bornholmesmart1500_heater): fix issues that do not conflict

- reverse display mapping

- make sleep mode hidden if unavailable, manual does not mention the feature and
  it did not appear in the original log.

- move eco to a separate switch, hidden by default, as the manual does not mention
  the feature, despite appearing in the original log.
- move fan_mode to preset_mode, as the manual explains this as heat mode,
  with options low, high and anti-frost (away).

Original reporter confirmed their device "is the same", so these changes appear
appropriate for the original device.

Did not apply:
- change of hvac_action dp from the documented 101 on #2862 to 11 as requested
  on #6454 without documented evidence.
  This conflicts with the documented evidence on #2862 that lists 11 as "Countdown"
  with integer type, and 101 as "heat" with read-only boolean type.
- removal of fault sensor on dp 12 - it is common for faults to only be indicated when
  there are faults present.

Product was also not linked due to the above conflicting information.

Issue #6454
Jason Rumney 17 ore fa
parent
commit
5ad1bb1545

+ 24 - 10
custom_components/tuya_local/devices/klarstein_bornholmsmart1500_heater.yaml

@@ -27,22 +27,14 @@ entities:
         name: current_temperature
       - id: 4
         type: string
-        name: fan_mode
+        name: preset_mode
         mapping:
           - dps_val: low
             value: low
           - dps_val: high
             value: high
           - dps_val: empty
-            value: "off"
-      - id: 5
-        type: boolean
-        name: preset_mode
-        mapping:
-          - dps_val: true
-            value: eco
-          - dps_val: false
-            value: comfort
+            value: away
       - id: 101
         type: boolean
         optional: true
@@ -149,11 +141,20 @@ entities:
   - entity: switch
     translation_key: sleep
     category: config
+    hidden: unavailable  # apparently not supported, missing from log
     dps:
       - id: 102
         optional: true
         type: boolean
         name: switch
+      - id: 102
+        optional: true
+        type: boolean
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: light
     translation_key: display
     category: config
@@ -161,3 +162,16 @@ entities:
       - id: 104
         type: boolean
         name: switch
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
+  - entity: switch
+    name: Eco
+    category: config
+    hidden: true  # apparently not supported despite presence in log
+    dps:
+      - id: 5
+        type: boolean
+        name: switch