Procházet zdrojové kódy

Revert "fix(poolsana_heatpump): device does not like multi-dps commands"

This reverts commit 1ba05491156ad6ffeafcb900defba1e2f2698236.

Issue was misdiagnosed as being related to multi-dps writes.
In fact it is the device that is toggling dp 1 on any write,
regardless of what is being written, contrary to normal convention.

Issue #6201
Jason Rumney před 12 hodinami
rodič
revize
8e3c30ccdf

+ 15 - 16
custom_components/tuya_local/devices/poolsana_heatpump.yaml

@@ -8,28 +8,28 @@ products:
     model: 9kW
     model: 9kW
     name: Lyfco 9kW Pool Heat Pump
     name: Lyfco 9kW Pool Heat Pump
 entities:
 entities:
-  - entity: switch
-    dps:
-      - id: 1
-        type: boolean
-        name: switch
-
   - entity: climate
   - entity: climate
     translation_key: pool_heatpump
     translation_key: pool_heatpump
     dps:
     dps:
       - id: 1
       - id: 1
         type: boolean
         type: boolean
-        name: available
-      - id: 2
-        type: string
         name: hvac_mode
         name: hvac_mode
         mapping:
         mapping:
-          - dps_val: Cooling
-            value: cool
-          - dps_val: Heating
-            value: heat
-          - dps_val: Auto
-            value: heat_cool
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: Cooling
+                value: cool
+              - dps_val: Heating
+                value: heat
+              - dps_val: Auto
+                value: heat_cool
+      - id: 2
+        type: string
+        name: mode
+        hidden: true
       - id: 4
       - id: 4
         type: integer
         type: integer
         name: temperature
         name: temperature
@@ -72,7 +72,6 @@ entities:
     dps:
     dps:
       - id: 25
       - id: 25
         type: integer
         type: integer
-        optional: true
         name: sensor
         name: sensor
         unit: "°C"
         unit: "°C"
         class: measurement
         class: measurement