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

Vine thermostat: fix temperature adjustments

- where values redirect to F dps, the scale is needed on the destination
- number entities for setting temperatures should have class temperature
- sensors showing times should have class duration even if they have a
  translation_key.

Issue #2371
Jason Rumney 1 год назад
Родитель
Сommit
762c4e8be7
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      custom_components/tuya_local/devices/vine_tj550_thermostat.yaml

+ 10 - 2
custom_components/tuya_local/devices/vine_tj550_thermostat.yaml

@@ -54,6 +54,8 @@ primary_entity:
       range:
         min: 420
         max: 1000
+      mapping:
+        - scale: 10
     - id: 18
       type: integer
       optional: true
@@ -231,6 +233,7 @@ secondary_entities:
   - entity: number
     name: Maximum temperature
     category: config
+    class: temperature
     icon: "mdi:thermometer-chevron-up"
     dps:
       - id: 19
@@ -266,6 +269,7 @@ secondary_entities:
   - entity: number
     name: Minimum temperature
     category: config
+    class: temperature
     icon: "mdi:thermometer-chevron-down"
     dps:
       - id: 26
@@ -341,6 +345,7 @@ secondary_entities:
         name: lock
   - entity: sensor
     translation_key: time_remaining
+    class: duration
     category: diagnostic
     dps:
       - id: 42
@@ -378,8 +383,8 @@ secondary_entities:
             value: "3 minutes"
   - entity: number
     name: Heat temperature
+    class: temperature
     category: config
-    icon: "mdi:thermometer"
     dps:
       - id: 54
         type: integer
@@ -393,6 +398,9 @@ secondary_entities:
             conditions:
               - dps_val: f
                 value_redirect: heat_f
+                range:
+                  min: 42
+                  max: 99
       - id: 55
         type: integer
         optional: true
@@ -423,7 +431,7 @@ secondary_entities:
   - entity: number
     name: Cool temperature
     category: config
-    icon: "mdi:thermometer"
+    class: temperature
     dps:
       - id: 57
         type: integer