Просмотр исходного кода

Workaround for inconsistent function

DPS1 (Power) is now controlled by HVAC_MODE and is either off or auto (on).
DPS4 (Mode) is controlled by PRESET_MODE.

This results in much more reliable functionality.
illuzn 3 лет назад
Родитель
Сommit
f01db93f7d
1 измененных файлов с 13 добавлено и 16 удалено
  1. 13 16
      custom_components/tuya_local/devices/kogan_kasthfp2kwa_towerheater.yaml

+ 13 - 16
custom_components/tuya_local/devices/kogan_kasthfp2kwa_towerheater.yaml

@@ -3,22 +3,15 @@ primary_entity:
   entity: climate
   entity: climate
   dps:
   dps:
     - id: 1
     - id: 1
-      name: hvac_mode
       type: boolean
       type: boolean
+      name: hvac_mode
       mapping:
       mapping:
         - dps_val: false
         - dps_val: false
           value: "off"
           value: "off"
           icon: "mdi:power"
           icon: "mdi:power"
           icon_priority: 1
           icon_priority: 1
         - dps_val: true
         - dps_val: true
-          constraint: heating_mode
-          conditions:
-            - dps_val: FAN
-              value: fan_only
-            - dps_val: LOW
-              value: dry
-            - dps_val: HIGH
-              value: heat
+          value: "auto"
     - id: 2
     - id: 2
       type: integer
       type: integer
       range:
       range:
@@ -35,24 +28,28 @@ primary_entity:
           - dps_val: false
           - dps_val: false
             invalid: true
             invalid: true
     - id: 4
     - id: 4
-      name: heating_mode
-      hidden: true
+      name: preset_mode
       type: string
       type: string
-      icon_priority: 2
       mapping:
       mapping:
-        - dps_val: FAN
-          icon: "mdi:fan"
         - dps_val: LOW
         - dps_val: LOW
+          value: "Low"
           icon: "mdi:radiator"
           icon: "mdi:radiator"
+          icon_priority: 2
+        - dps_val: FAN
+          value: "Fan"
+          icon: "mdi:fan"
+          icon_priority: 2
         - dps_val: HIGH
         - dps_val: HIGH
+          value: "High"
           icon: "mdi:fire"
           icon: "mdi:fire"
+          icon_priority: 2
     - id: 8
     - id: 8
       type: boolean
       type: boolean
       mapping:
       mapping:
         - dps_val: true
         - dps_val: true
-          value: "On"
+          value: "on"
         - dps_val: false
         - dps_val: false
-          value: "Off"
+          value: "off"
       name: swing_mode
       name: swing_mode
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch