Преглед изворни кода

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