Kaynağa Gözat

Summary: feat (earu_k6h3aw_thermostat): support K6RH variant

PR #3898, with reference back to #2602 for improvements and confirmation
Jason Rumney 3 ay önce
ebeveyn
işleme
fff9df02c2

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1098,3 +1098,4 @@ Further device support has been made with the assistance of users. Please consid
 - [colin-nolan](https://github.com/colin-nolan) for contributing improvements to Catit Pixi smart feeder.
 - [flow-c](https://github.com/flow-c) for contributing support for Mi-Heat TH11 thermostat.
 - [kjpg99](https://github.com/kjpg99) for contributing improvements to Klarta Stor 2 and Forste 4 purifiers, and Polish translations.
+- [MiguelDomingues](https://github.com/MiguelDomingues) for contributing support for EARU K6RH-3A thermostat.

+ 89 - 4
custom_components/tuya_local/devices/earu_k6h3aw_thermostat.yaml

@@ -3,6 +3,9 @@ products:
   - id: v6foggibzyjlvwdx
     manufacturer: EARU
     model: K6H-3A-W
+  - id: tqzbywoehwchxlk9
+    manufacturer: EARU
+    model: K6RH-3A-WiFi
 entities:
   - entity: climate
     translation_key: thermostat
@@ -36,6 +39,7 @@ entities:
           - scale: 10
             step: 5
       - id: 19
+        optional: true
         type: integer
         name: max_temperature
         mapping:
@@ -103,6 +107,27 @@ entities:
           - dps_val: ALL
             icon: "mdi:thermometer"
             value: Both
+            available: k6h
+          - dps_val: all
+            icon: "mdi:thermometer"
+            value: Both
+            available: k6rh
+      - id: 7
+        type: boolean
+        optional: true
+        name: k6h
+        mapping:
+          - dps_val: null
+            value: true
+          - value: false
+      - id: 7
+        type: boolean
+        optional: true
+        name: k6rh
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: binary_sensor
     category: diagnostic
     class: problem
@@ -124,8 +149,9 @@ entities:
     icon: "mdi:thermometer-chevron-up"
     dps:
       - id: 19
-        type: integer
+        optional: true
         name: value
+        type: integer
         unit: C
         range:
           min: 200
@@ -176,12 +202,18 @@ entities:
             value: "6 days"
           - dps_val: "70"
             value: "7 days"
+  - entity: text
+    name: Week program
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
       - id: 30
-        type: string
+        type: base64
+        name: value
         optional: true
-        name: week_program
   - entity: light
-    name: Backlight
+    translation_key: backlight
     category: config
     dps:
       - id: 44
@@ -196,11 +228,64 @@ entities:
     category: config
     class: temperature
     icon: "mdi:thermometer-alert"
+    hidden: unavailable
     dps:
       - id: 101
         type: integer
+        optional: true
         name: value
         unit: C
         range:
           min: 20
           max: 100
+      - id: 101
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: switch
+    name: Sound
+    icon: "mdi:ear-hearing"
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 7
+        type: boolean
+        optional: true
+        name: switch
+      - id: 7
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: number
+    name: Hysteresis
+    category: config
+    class: temperature
+    icon: "mdi:thermometer-alert"
+    hidden: unavailable
+    dps:
+      - id: 75
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 0
+          max: 50
+        mapping:
+          - scale: 10
+      - id: 75
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true