Sfoglia il codice sorgente

Add support for WarmeHaus Thermostatic Towel Rail Electric Heating Element (#3946)

* Add WarmeHaus Thermostatic Towel Rail Electric Heating Element device support

* fix up hvan action

* Add missing config

* fix type

* fix (warmehaus_afd02tj_thermostat_c): changes from review

- only use lowercase in filename to avoid issues on case-insensitive filesystems
- reduce device name length and remove branding
- use correct scale (Tuya is decimal places to shift, this integration uses a multiplier)
- remove redundant range and step on read-only sensor
- map presets to existing translations
  - "Free mode" becomes "comfort" (the only mode where temperature can be set)
  - "Constant mode" becomes "manual"
  - "Boost" becomes "boost"
  - "Program" becomes "program"

PR #3946

* fix (warmehaus_afd02tj_thermostat_c): use correct dp types and names

- remove extra blank lines that github web editor seems to insert on every save.

PR #3946

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Dominic Taylor 4 mesi fa
parent
commit
64c5d55619

+ 109 - 0
custom_components/tuya_local/devices/warmehaus_afd02tj_thermostat_c.yaml

@@ -0,0 +1,109 @@
+name: Towel warmer
+products:
+  - id: fgzmbjxhgkuwgrav
+    manufacturer: WarmeHaus
+    model: AFD-02-TJ
+entities:
+  - entity: climate
+    translation_only_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: hot
+            value: comfort
+          - dps_val: cold
+            value: manual
+          - dps_val: eco
+            value: boost
+          - dps_val: auto
+            value: program
+      - id: 16
+        name: temperature
+        type: integer
+        unit: C
+        optional: true
+        range:
+          min: 300
+          max: 700
+        mapping:
+          - scale: 10
+            step: 10
+            constraint: preset_mode
+            conditions:
+              - dps_val: [cold, eco, auto]
+                invalid: true
+      - id: 24
+        type: integer
+        name: current_temperature
+      - id: 1
+        type: boolean
+        name: hvac_action
+        mapping:
+          - dps_val: true
+            value: heating
+          - dps_val: false
+            value: idle
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 111
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 5
+          max: 80
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: sensor
+    translation_key: time_remaining
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 111
+        type: integer
+        name: sensor
+        unit: h
+        mapping:
+          - scale: 10
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 40
+        name: lock
+        type: boolean
+  - entity: number
+    name: Temperature calibration
+    category: config
+    icon: 'mdi:thermometer-check'
+    dps:
+      - id: 27
+        type: integer
+        name: value
+        unit: °
+        range:
+          min: -5
+          max: 5
+  - entity: text
+    name: Program
+    category: config
+    hidden: true
+    dps:
+      - id: 110
+        type: base64
+        optional: true
+        name: value