Przeglądaj źródła

Add Boost countdown to Mi-Heat TH11 WF thermostat (#4021)

* Add support for Mi-Heat TH11-WF thermostat

* Add config for new device
* Add translation_keys for "holiday_mode" and "eco_mode"
* Add default icons for said translation_keys

* Fixed lint and type errors

* cleanup (miheat_th11wf_thermostat): changes from review

- rename file without hyphens to follow brand_model_type convention.
- comment products section with invalid id
- remove redundant `persist: true` directives
- fix step config for temperature
- combine mode and holiday_mode into climate preset_mode
- rename eco_mode to Eco, which is the same in most languages
- revert translations for holiday_mode and eco_mode
- convert status sensor with only value as "ok" to a problem binary_sensor
- convert window sensor to a binary_sensor, guessing the string values
- add icon for Boost, and use standard translations for times

PR #3783

* Fix typo in measurement class for thermostat

* Add Boost countdown to Mi-Heat TH11 WF thermostat

Add a sensor entity that …
* displays the remaining minutes of a Boost period,
* resets the Boost entity to 'cancel' when time has elapsed to make it obvious
  that Boost is over.

* Remove unnecessary mapping

* Reorder entities by id

* Fix scale for energy counter

---------

Co-authored-by: Jason Rumney <jasonrumney@gmail.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
flow-c 5 miesięcy temu
rodzic
commit
00e2043c26

+ 36 - 25
custom_components/tuya_local/devices/miheat_th11wf_thermostat.yaml

@@ -40,6 +40,10 @@ entities:
         name: mode
         type: string
         hidden: true
+      - id: 111
+        type: string
+        name: p_mode
+        hidden: true
       - id: 113
         type: boolean
         name: preset_mode
@@ -53,18 +57,14 @@ entities:
                 value: manual
               - dps_val: program
                 value: program
-      - id: 111
-        type: string
-        name: p_mode
-        hidden: true
-  - entity: sensor
-    class: humidity
+  - entity: switch
+    name: Eco
+    icon: "mdi:leaf"
+    category: config
     dps:
-      - id: 121
-        name: sensor
-        type: integer
-        unit: "%"
-        class: measurement
+      - id: 8
+        type: boolean
+        name: switch
   - entity: lock
     translation_key: child_lock
     category: config
@@ -105,6 +105,8 @@ entities:
         precision: 0
         unit: kWh
         class: total_increasing
+        mapping:
+          - scale: 100
   - entity: binary_sensor
     class: window
     dps:
@@ -115,21 +117,15 @@ entities:
           - dps_val: open
             value: true
           - value: false
-  - entity: switch
-    name: Eco
-    icon: "mdi:leaf"
-    category: config
-    dps:
-      - id: 8
-        type: boolean
-        name: switch
-  - entity: switch
-    translation_key: anti_frost
-    category: config
+  - entity: sensor
+    translation_key: time_remaining
+    class: duration
+    category: diagnostic
     dps:
-      - id: 123
-        type: boolean
-        name: switch
+      - id: 119
+        type: integer
+        name: sensor
+        unit: min
   - entity: select
     name: Boost
     translation_key: timer
@@ -189,3 +185,18 @@ entities:
             value: "1h55m"
           - dps_val: "120min"
             value: "2h"
+  - entity: sensor
+    class: humidity
+    dps:
+      - id: 121
+        name: sensor
+        type: integer
+        unit: "%"
+        class: measurement
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 123
+        type: boolean
+        name: switch