4
0
Эх сурвалжийг харах

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

Split hvac_mode into a seperate switch and the modes.
Since off is no longer selectable from the climate entity, disable the
climate entity when off to show it is not controllable.

Make outflow temperature optional.

Issue #5874
Jason Rumney 13 цаг өмнө
parent
commit
1ba0549115

+ 16 - 15
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: hvac_mode
-        mapping:
-          - 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
+        name: available
       - id: 2
       - id: 2
         type: string
         type: string
-        name: mode
-        hidden: true
+        name: hvac_mode
+        mapping:
+          - dps_val: Cooling
+            value: cool
+          - dps_val: Heating
+            value: heat
+          - dps_val: Auto
+            value: heat_cool
       - id: 4
       - id: 4
         type: integer
         type: integer
         name: temperature
         name: temperature
@@ -72,6 +72,7 @@ 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