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

Add support for Infrared Heater Panels from Termoplaza (#4575)

* TermoPlaza heater added, dpc up to id 19 done.

* Heater fixes for countdown

* First working version with all dps.

* All features implemented and tested, double-checked with app and relabeled to be compatible with tuya app. Weekly program details need to be edited in tuya app - no documentation on the encoding available.

* Missing enum mappings added, translation key for work power added.

* Pr changes requested (#1)

* Requested changes from PR - testing in progress.

* Brightness mapping done.

* Testing done, reverted back to discrete brightness levels for better usability.

* All tests passed, requested changes done.

* fix (termoplaza_panel_heater): quotes and translation_keys

- Use quotes where needed, strip from where not needed
- add translation_key back for select timer, and use standard key for cancel.
- add status translation_key to Surface status, and use heating from there, along with cold and warm which will be added.

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Roman Schmitz 4 дней назад
Родитель
Сommit
4f2a4b7b38
1 измененных файлов с 166 добавлено и 0 удалено
  1. 166 0
      custom_components/tuya_local/devices/termoplaza_panel_heater.yaml

+ 166 - 0
custom_components/tuya_local/devices/termoplaza_panel_heater.yaml

@@ -0,0 +1,166 @@
+name: Infrared panel heater
+products:
+  - id: xlln3q6hczrp31df
+    manufacturer: TermoPlaza
+    model: TermoPlaza900
+entities:
+  - entity: climate
+    translation_only_key: heater
+    dps:
+      - id: 1
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: true
+            value: "heat"
+          - dps_val: false
+            value: "off"
+      - id: 2
+        name: temperature
+        type: integer
+        range:
+          min: 5
+          max: 30
+        unit: C
+        optional: true
+      - id: 3
+        name: current_temperature
+        type: integer
+      - id: 4
+        name: preset_mode
+        type: string
+        optional: true
+        mapping:
+          - dps_val: ECO
+            value: eco
+          - dps_val: Comfort
+            value: comfort
+          - dps_val: Night
+            value: sleep
+          - dps_val: "Off"
+            value: none
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        type: boolean
+        name: lock
+  - entity: sensor
+    name: Surface status
+    class: enum
+    translation_key: status
+    category: diagnostic
+    dps:
+      - id: 11
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: heating
+            value: heating
+          - dps_val: warm
+            value: warm
+          - dps_val: cold
+            value: cold
+  - entity: sensor
+    name: Duty cycle
+    dps:
+      - id: 12
+        type: integer
+        optional: true
+        name: sensor
+        unit: "%"
+  - name: Turbo mode timer
+    entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 19
+        name: option
+        type: string
+        optional: true
+        mapping:
+          - dps_val: "0"
+            value: cancel
+          - dps_val: "1"
+            value: 2h
+          - dps_val: "2"
+            value: 4h
+          - dps_val: "3"
+            value: 6h
+          - dps_val: "4"
+            value: 8h
+          - dps_val: "5"
+            value: 10h
+          - dps_val: "6"
+            value: 12h
+          - dps_val: "7"
+            value: 14h
+          - dps_val: "8"
+            value: 16h
+          - dps_val: "9"
+            value: 18h
+          - dps_val: "10"
+            value: 20h
+          - dps_val: "11"
+            value: 22h
+          - dps_val: "12"
+            value: 24h
+  - name: Program mode
+    entity: switch
+    category: config
+    dps:
+      - id: 110
+        type: boolean
+        name: switch
+  - name: Brightness level
+    entity: select
+    category: config
+    dps:
+      - id: 112
+        type: string
+        name: option
+        mapping:
+          - dps_val: 0
+            value: Low
+          - dps_val: 1
+            value: Average
+          - dps_val: 2
+            value: Above avg
+          - dps_val: 3
+            value: Comfort
+          - dps_val: 4
+            value: High
+  - name: Maximum surface temperature
+    entity: number
+    category: config
+    class: temperature
+    dps:
+      - id: 113
+        type: integer
+        name: value
+        unit: C
+        range:
+          min: 45
+          max: 95
+  - name: Surface temperature
+    category: diagnostic
+    entity: sensor
+    class: temperature
+    dps:
+      - id: 114
+        class: measurement
+        type: integer
+        unit: C
+        name: sensor
+        range:
+          min: -10
+          max: 110
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    hidden: true
+    dps:
+      - id: 115
+        type: boolean
+        name: button