Sfoglia il codice sorgente

feat (hysen_hy101rf_thermostat): support Kekotek KTF017802

This device is missing the external sensor and 3 related dps,
otherwise identical. Make these 3 entities optional and hidden if
unavailable.

Split program out into text entities in case any user wants to layer
programming on top. These dps do not seem to be reported by the device,
but probably can be set, and maybe can have the current values coaxed out
somehow. Since they aren't useful without advanced investigation, the
entities are disabled by default.

Issue #4468 / PR #4477
Jason Rumney 3 giorni fa
parent
commit
4c89723ee8

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1246,3 +1246,4 @@ Further device support has been made with the assistance of users. Please consid
 - [evanjd](https://github.com/evanjd) for contributing support for Breville Smart Air Viral Protect Night Glow air purifier.
 - [trixing](https://github.com/trixing) for contributing support for PV28-AW CO2 monitor.
 - [hofvanta](https://github.com/hofvanta) for assisting with support for PNI CT45 thermostat.
+- [marco-calautti](https://github.com/marco-calautti) for contributing support for Kekotek KTF017802 thermostat which was merged with Hysen HY101RF.

+ 65 - 8
custom_components/tuya_local/devices/hysen_hy101rf_thermostat.yaml

@@ -3,6 +3,9 @@ products:
   - id: 9u1pognermrqhicq
     manufacturer: Hysen
     model: HY101RF
+  - id: hlbr5y67unkyfpfs
+    manufacturer: Kekotek
+    model: KTF017802
 entities:
   - entity: climate
     translation_key: thermostat
@@ -189,22 +192,34 @@ entities:
     name: External temperature zone
     category: config
     icon: "mdi:thermometer-plus"
+    hidden: unavailable
     dps:
       - id: 111
         type: integer
+        optional: true
         name: value
         unit: °
         range:
           min: 1
           max: 18
+      - id: 111
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: number
     name: High temperature limit
     category: config
     class: temperature
     icon: "mdi:thermometer-alert"
+    hidden: unavailable
     dps:
       - id: 112
         type: integer
+        optional: true
         name: value
         range:
           min: 20
@@ -217,6 +232,14 @@ entities:
             value: C
           - dps_val: true
             value: F
+      - id: 112
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: number
     name: Low temperature limit
     category: config
@@ -279,9 +302,11 @@ entities:
     name: Temperature sensor
     icon: "mdi:home-thermometer"
     category: config
+    hidden: unavailable
     dps:
       - id: 116
         type: string
+        optional: true
         name: option
         mapping:
           - dps_val: in
@@ -290,6 +315,14 @@ entities:
             value: External
           - dps_val: all
             value: Both
+      - id: 116
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: select
     translation_key: initial_state
     category: config
@@ -319,19 +352,43 @@ entities:
             value: "Mon-Sat+Sun"
           - dps_val: "0days"
             value: Daily
+  - entity: text
+    name: Weekday program 1
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
       - id: 119
-        type: string
+        type: base64
         optional: true
-        name: program_workday_1
+        name: value
+  - entity: text
+    name: Weekday program 2
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
       - id: 120
-        type: string
+        type: base64
         optional: true
-        name: program_workday_2
+        name: value
+  - entity: text
+    name: Weekend program 1
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
       - id: 121
-        type: string
+        type: base64
         optional: true
-        name: program_restday_1
+        name: value
+  - entity: text
+    name: Weekend program 2
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
       - id: 122
-        type: string
+        type: base64
         optional: true
-        name: program_restday_2
+        name: value