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

Avatto WT20R: rename file, fix dps definitions

- Rename file to include device type
- Use correct dp names for temperatures
- Simplify hvac_mode logic to disentangle from preset_mode
- remove comments that are not formatted as yamllint expects

PR #3026
Jason Rumney 11 месяцев назад
Родитель
Сommit
956958f0ed
1 измененных файлов с 7 добавлено и 16 удалено
  1. 7 16
      custom_components/tuya_local/devices/avatto_wt20r_thermostat.yaml

+ 7 - 16
custom_components/tuya_local/devices/avatto_wt20r.yaml → custom_components/tuya_local/devices/avatto_wt20r_thermostat.yaml

@@ -1,13 +1,12 @@
-name: AVATTO Smart Knob Thermostat
+name: Thermostat
 products:
   - id: axhyyv6w36e5oagp
     manufacturer: Avatto
-    model: WS20R
+    model: WS20R smart knob
 entities:
   - entity: climate
-    translation_only_key: thermostat
+    translation_key: thermostat
     dps:
-    #On or Off (general)
       - id: 1
         name: hvac_mode
         type: boolean
@@ -15,31 +14,23 @@ entities:
           - dps_val: false
             value: "off"
           - dps_val: true
-            constraint: mode
-            conditions:
-              - dps_val: auto
-                value: auto
-              - dps_val: manual
-                value: heat
-    #On-modes (presets)
+            value: heat
       - id: 2
         type: string
-        name: mode
+        name: preset_mode
         mapping:
           - dps_val: auto
             value: program
           - dps_val: manual
             value: manual
-     #target set-temperature in C
       - id: 3
-        name: temp_set
+        name: temperature
         type: integer
         unit: C
         range:
           min: 5
           max: 45
-     #current temperature in C
       - id: 24
         type: integer
-        name: current_temp
+        name: current_temperature
         optional: true