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

Fixup config

Fixes up the config to address PR comments.
Jacob Pennington 2 лет назад
Родитель
Сommit
dcd69f95aa
1 измененных файлов с 27 добавлено и 31 удалено
  1. 27 31
      custom_components/tuya_local/devices/ecostrad_iq_heating_element.yaml

+ 27 - 31
custom_components/tuya_local/devices/ecostrad_iq_heating_element.yaml

@@ -1,6 +1,7 @@
 name: Ecostrad iQ Heating Element
 primary_entity:
   entity: climate
+  translation_key: thermostat
   icon: "mdi:radiator"
   dps:
     - id: 1
@@ -16,17 +17,13 @@ primary_entity:
       name: preset_mode
       mapping:
         - dps_val: "auto"
-          value: Program
-          icon: "mdi:clock-outline"
+          value: program
         - dps_val: "eco"
-          value: Eco
-          icon: "mdi:moon-waxing-crescent"
+          value: eco
         - dps_val: "hot"
-          value: Comfort
-          icon: "mdi:weather-sunny"
+          value: comfort
         - dps_val: "only_inside"
-          value: Radiator
-          icon: "mdi:radiator"
+          value: boost
     - id: 16
       type: integer
       name: temperature
@@ -36,26 +33,33 @@ primary_entity:
       mapping:
         - scale: 10
           step: 5
+          constraint: preset_mode
+          conditions:
+            - dps_val: only_inside
+              value_redirect: radiator_temperature
+              range:
+                min: 300
+                max: 700
     - id: 24
       type: integer
       name: current_temperature
       mapping:
         - scale: 10
+    - id: 57
+      type: integer
+      name: radiator_temperature
+      range:
+        min: 300
+        max: 700
+      mapping:
+        - scale: 10
+          step: 5
+    - id: 110
+      type: string
+      name: schedule
+      optional: true
+
 secondary_entities:
-  - entity: number
-    name: Radiator Mode Temperature
-    category: config
-    dps:
-      - id: 57
-        type: integer
-        name: value
-        unit: C
-        range:
-          min: 300
-          max: 700
-        mapping:
-          - scale: 10
-            step: 50
   - entity: lock
     name: Child lock
     category: config
@@ -92,7 +96,7 @@ secondary_entities:
       - id: 111
         type: integer
         name: value
-        unit: hours
+        unit: h
         range:
           min: 0
           max: 7
@@ -103,14 +107,6 @@ secondary_entities:
       - id: 27
         type: integer
         name: value
-        unit: C
         range:
           min: -5
           max: 5
-  - entity: sensor
-    name: Schedule Encoded
-    dps:
-      - id: 110
-        name: sensor
-        type: base64
-        optional: true