Explorar o código

fix wrong logic for hvac_mode

Aaron %!s(int64=2) %!d(string=hai) anos
pai
achega
f6110a39f1
Modificáronse 1 ficheiros con 21 adicións e 25 borrados
  1. 21 25
      custom_components/tuya_local/devices/hyd_weair_plus_fan.yaml

+ 21 - 25
custom_components/tuya_local/devices/hyd_weair_plus_fan.yaml

@@ -6,9 +6,18 @@ primary_entity:
   entity: climate
   dps:
     - id: 1
+      name: hvac_mode
       type: boolean
-      name: mode
-      hidden: true
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          constraint: mode
+          conditions:
+            - dps_val: true
+              value: "heat"
+            - dps_val: false
+              value: "fan_only"
     - id: 2
       name: fan_mode
       type: string
@@ -65,21 +74,9 @@ primary_entity:
       name: fault
       optional: true
     - id: 103
-      name: hvac_mode
       type: boolean
-      mapping:
-        - dps_val: true
-          value: "heat"
-          icon: "mdi:radiator"
-        - dps_val: false
-          value: "off"
-          icon: "mdi:radiator-disabled"
-          constraint: mode
-          conditions:
-            - dps_val: true
-              value: "cool"
-            - dps_val: false
-              value: "off"
+      name: mode
+      hidden: true
 secondary_entities:
   - entity: select
     name: Timer
@@ -88,26 +85,25 @@ secondary_entities:
       - id: 11
         type: string
         name: option
-        unit: "hour"
         mapping:
           - dps_val: "0"
             value: "Off"
           - dps_val: "1"
-            value: "1"
+            value: "1 hour"
           - dps_val: "2"
-            value: "2"
+            value: "2 hours"
           - dps_val: "3"
-            value: "3"
+            value: "3 hours"
           - dps_val: "4"
-            value: "4"
+            value: "4 hours"
           - dps_val: "5"
-            value: "5"
+            value: "5 hours"
           - dps_val: "6"
-            value: "6"
+            value: "6 hours"
           - dps_val: "7"
-            value: "7"
+            value: "7 hours"
           - dps_val: "8"
-            value: "8"
+            value: "8 hours"
   - entity: sensor
     name: Time remaining
     class: "duration"