Quellcode durchsuchen

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 vor 11 Stunden
Ursprung
Commit
1ba0549115
1 geänderte Dateien mit 16 neuen und 15 gelöschten Zeilen
  1. 16 15
      custom_components/tuya_local/devices/poolsana_heatpump.yaml

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

@@ -8,28 +8,28 @@ products:
     model: 9kW
     name: Lyfco 9kW Pool Heat Pump
 entities:
+  - entity: switch
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+
   - entity: climate
     translation_key: pool_heatpump
     dps:
       - id: 1
         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
         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
         type: integer
         name: temperature
@@ -72,6 +72,7 @@ entities:
     dps:
       - id: 25
         type: integer
+        optional: true
         name: sensor
         unit: "°C"
         class: measurement