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

feat (devices): support for Moes WHT-S01 thermostat

Issue #3879
Jason Rumney 3 месяцев назад
Родитель
Сommit
2a00384e88
3 измененных файлов с 359 добавлено и 1 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 1
      DEVICES.md
  3. 357 0
      custom_components/tuya_local/devices/moes_whts01_thermostat.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1085,3 +1085,4 @@ Further device support has been made with the assistance of users. Please consid
 - [f3peter](https://github.com/f3peter) for assisting with support for Moes smart wake up light alarm clock.
 - [jeppesens](https://github.com/jeppesens) for contributing support for Woods MRD25GW.
 - [slowrie23](https://github.com/slowrie23) for assisting with support for RecTeq RT-B380X Bullseye Deluxe grill.
+- [cihancelikkk](https://github.com/cihancelikkk) for assisting with support for Moes WHT-S01 thermostat.

+ 1 - 1
DEVICES.md

@@ -230,7 +230,7 @@
 - Minco MH-1823D thermostat
 - Moes BHT-002 thermostat (without external temp sensor)
 - Moes MS-103 temperature and humidity switch (partial functions, temperature only)
-- Moes WHT-009 thermostat
+- Moes WHT-009, WHT-S01 thermostats
 - Multi Leaf DY-107 thermostat
 - Myuet ME82 thermostat
 - Nashone MTS-700-WB thermostat smartplug

+ 357 - 0
custom_components/tuya_local/devices/moes_whts01_thermostat.yaml

@@ -0,0 +1,357 @@
+name: Thermostat
+products:
+  - id: ohdk8akzkfjkqkbs
+    manufacturer: Moes
+    model: WHT-S01-GAC-WH-MS
+entities:
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: auto
+            value: program
+          - dps_val: manual
+            value: manual
+          - dps_val: ECO
+            value: eco
+      - id: 23
+        type: string
+        name: temperature_unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+      - id: 36
+        type: string
+        name: hvac_action
+        mapping:
+          - dps_val: open
+            value: heating
+          - dps_val: close
+            value: idle
+      - id: 111
+        type: integer
+        name: temperature
+        range:
+          min: 41
+          max: 700
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: c
+                scale: 10
+                step: 5
+                range:
+                  min: 50
+                  max: 700
+              - dps_val: f
+                value_redirect: temp_set_f
+                range:
+                  min: 41
+                  max: 158
+      - id: 112
+        type: integer
+        optional: true
+        name: temp_set_f
+        hidden: true
+        range:
+          min: 41
+          max: 158
+      - id: 113
+        type: integer
+        optional: true
+        name: max_temp_f
+        hidden: true
+      - id: 114
+        type: integer
+        name: max_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: max_temp_f
+              - dps_val: c
+                scale: 10
+      - id: 115
+        type: integer
+        optional: true
+        name: min_temp_f
+        hidden: true
+      - id: 116
+        type: integer
+        name: min_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: min_temp_f
+              - dps_val: c
+                scale: 10
+      - id: 117
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: current_temp_f
+              - dps_val: c
+                scale: 10
+      - id: 118
+        type: integer
+        optional: true
+        name: current_temp_f
+        hidden: true
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 23
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: number
+    name: Temperature correction
+    category: config
+    icon: "mdi:thermometer-check"
+    dps:
+      - id: 27
+        type: integer
+        name: value
+        unit: °
+        range:
+          min: -18
+          max: 18
+        mapping:
+          - constraint: temp_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_correct_f
+              - dps_val: c
+                range:
+                  min: -9
+                  max: 9
+      - id: 23
+        type: string
+        name: temp_unit
+        hidden: true
+      - id: 110
+        type: integer
+        optional: true
+        name: temp_correct_f
+        hidden: true
+        range:
+          min: -18
+          max: 18
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    hidden: true
+    dps:
+      - id: 39
+        type: boolean
+        optional: true
+        name: button
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 40
+        type: boolean
+        name: lock
+  - entity: select
+    name: Temperature sensor
+    icon: "mdi:home-thermometer"
+    category: config
+    dps:
+      - id: 43
+        type: string
+        name: option
+        mapping:
+          - dps_val: in
+            value: Internal
+          - dps_val: out
+            value: External
+          - dps_val: both
+            value: Both
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        name: fault_code
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 52
+        name: brightness
+        type: string
+        mapping:
+          - dps_val: closed
+            value: 0
+          - dps_val: "20_bright"
+            value: 51
+          - dps_val: "50_bright"
+            value: 128
+          - dps_val: "100_bright"
+            value: 255
+  - entity: sensor
+    name: Floor temperature
+    class: temperature
+    dps:
+      - id: 101
+        type: integer
+        name: sensor
+        class: measurement
+        mapping:
+          - constraint: unit
+            conditions:
+              - dps_val: f
+                value_redirect: floor_temp_f
+              - dps_val: c
+                scale: 10
+      - id: 23
+        type: string
+        name: unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+      - id: 102
+        type: integer
+        optional: true
+        name: floor_temp_f
+        hidden: true
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: select
+    name: Program type
+    icon: "mdi:calendar-week"
+    category: config
+    dps:
+      - id: 104
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "off"
+          - dps_val: weekend
+            value: Weekdays+Weekend
+          - dps_val: single_break
+            value: Mon-Sat+Sun
+          - dps_val: no_day_off
+            value: Daily
+  - entity: number
+    name: Temperature hysteresis
+    category: config
+    icon: "mdi:thermometer"
+    dps:
+      - id: 106
+        type: integer
+        name: value
+        unit: °
+        range:
+          min: 1
+          max: 30
+        mapping:
+          - constraint: temp_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_diff_f
+                range:
+                  min: 1
+                  max: 6
+              - dps_val: c
+                scale: 10
+                step: 5
+                range:
+                  min: 5
+                  max: 30
+      - id: 105
+        type: integer
+        optional: true
+        name: temp_diff_f
+        hidden: true
+        range:
+          min: 1
+          max: 6
+      - id: 23
+        type: string
+        name: temp_unit
+        hidden: true
+  - entity: number
+    name: Eco temperature
+    category: config
+    class: temperature
+    dps:
+      - id: 107
+        type: integer
+        name: value
+        range:
+          min: 5
+          max: 95
+        mapping:
+          - constraint: unit
+            conditions:
+              - dps_val: c
+                range:
+                  min: 5
+                  max: 35
+              - dps_val: f
+                value_redirect: eco_temp_f
+                range:
+                  min: 41
+                  max: 95
+      - id: 23
+        type: string
+        name: unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+      - id: 109
+        type: integer
+        optional: true
+        name: eco_temp_f
+        range:
+          min: 41
+          max: 95
+  - entity: text
+    name: Schedule
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
+      - id: 108
+        type: base64
+        optional: true
+        name: value