فهرست منبع

Avatto WS20R thermostat: add additional dps, docs for PR #3026

PR #3026 was only very basic thermostat controls. From issue #2938
there are many more dps supported by this device.
Jason Rumney 11 ماه پیش
والد
کامیت
4881143569
3فایلهای تغییر یافته به همراه132 افزوده شده و 2 حذف شده
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 130 1
      custom_components/tuya_local/devices/avatto_wt20r_thermostat.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -53,7 +53,7 @@ Further device support has been made with the assistance of users. Please consid
 - [Skro11-ru](https://github.com/Skro11-ru) for assistance in supporting Moes BHT-002 variant without external temperature sensor.
 - [novisys](https://github.com/novisys) for clarifications about BHT-6000 thermostat functionality.
 - [nzcodarnoc](https://github.com/nzcodarnoc) for contributing support for Kogan KASHMFP heaters.
-- [pascaltippelt](https://github.com/pascaltippelt) for contributing support for Morris MDB-12160HIW dehumidifier and assistance supporting Minco MH-1823 thermostat.
+- [pascaltippelt](https://github.com/pascaltippelt) for contributing support for Morris MDB-12160HIW dehumidifier, Avatto WS20R thermostat and assistance supporting Minco MH-1823 thermostat.
 - [voed](https://github.com/voed) for assistance in supporting Advanced Energy monitoring smart switch, based on CBE smart switch but seeming to follow a Tuya Standard Template, so probably applicable to others.
 - [myevit](https://github.com/myevit) for assistance in supporting simple garage doors.
 - [maartendamen](https://github.com/maartendamen) for assistance in supporting Eurom Mon Soleil 601 heaters.

+ 1 - 0
DEVICES.md

@@ -180,6 +180,7 @@
 - Arlec PCTH01HA temperature/humidity smart switch
 - Atorch AT4PTW DIN rail thermostat
 - Avatto ME81 thermostat
+- Avatto WS20R smart knob thermostat
 - Avatto WT100 thermostat
 - Awow/Mi-heat TH213 thermostat (two variants)
 - Beca BAC-002 thermostat (confirmed on BAC-005 also, likely works with other BAC-00x models)

+ 130 - 1
custom_components/tuya_local/devices/avatto_wt20r_thermostat.yaml

@@ -10,6 +10,7 @@ entities:
       - id: 1
         name: hvac_mode
         type: boolean
+        optional: true
         mapping:
           - dps_val: false
             value: "off"
@@ -17,6 +18,7 @@ entities:
             value: heat
       - id: 2
         type: string
+        optional: true
         name: preset_mode
         mapping:
           - dps_val: auto
@@ -26,11 +28,138 @@ entities:
       - id: 3
         name: temperature
         type: integer
-        unit: C
+        optional: true
         range:
           min: 5
           max: 45
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                range:
+                  min: 41
+                  max: 113
+                value_redirect: temp_set_f
       - id: 24
         type: integer
         name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_cur_f
+      - id: 23
+        type: string
+        optional: true
+        name: temperature_unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+      - id: 17
+        type: integer
+        optional: true
+        name: temp_set_f
+        range:
+          min: 41
+          max: 113
+      - id: 29
+        type: integer
+        optional: true
+        name: temp_cur_f
+      - id: 25
+        type: integer
+        optional: true
+        name: current_humidity
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 23
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: select
+    name: Schedule days
+    icon: "mdi:calendar-week"
+    category: config
+    dps:
+      - id: 31
+        type: string
         optional: true
+        name: option
+        mapping:
+          - dps_val: 5_2
+            value: Weekdays+Weekend
+          - dps_val: 6_1
+            value: Mon-Sat+Sun
+          - dps_val: 7
+            value: Daily
+  - entity: binary_sensor
+    name: Manual override
+    category: diagnostic
+    dps:
+      - id: 32
+        type: boolean
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: manual
+            value: true
+          - value: false
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    dps:
+      - id: 39
+        type: boolean
+        optional: true
+        name: button
+  - entity: light
+    translation_key: backlight
+    category: config
+    dps:
+      - id: 44
+        name: brightness
+        type: integer
+        optional: true
+        range:
+          min: 0
+          max: 100
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        optional: true
+        name: fault_code
+  - entity: select
+    name: Sensor
+    icon: "mdi:thermometer"
+    category: config
+    dps:
+      - id: 101
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: in
+            value: Internal
+          - dps_val: out
+            value: External