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

feat(devices): add heat pump water heater (product id cojwk3pbppwpgofa) (#5001)

* feat(devices): add heat pump water heater (product id cojwk3pbppwpgofa)

* fix: correct sensor class for top tank temperature

* fix: move entity classes to correct level, fix power consumption sensor

* fix: use translation_key for mode select entity

* fix: address reviewer feedback - add manufacturer/model, fix entities

* fix(tauclima_dgn250_waterheater): naming changes

- include device identity in filename
- generic top level name in case of other matches
- name not needed in products, just manufacturer and model
- use more specific heat_pump_mode translation for option matches

PR #5001

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Salvatore Battaglia 1 неделя назад
Родитель
Сommit
4d120c92ab

+ 97 - 0
custom_components/tuya_local/devices/tauclima_dgn250_waterheater.yaml

@@ -0,0 +1,97 @@
+name: Heat pump water heater
+
+products:
+  - id: cojwk3pbppwpgofa
+    manufacturer: Tauclima
+    model: DGN-250
+
+entities:
+  - entity: water_heater
+    dps:
+      - id: 1
+        type: boolean
+        name: operation_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat_pump
+
+      - id: 4
+        type: integer
+        name: temperature
+        unit: C
+        range:
+          min: 5
+          max: 75
+
+      - id: 16
+        type: integer
+        name: current_temperature
+        unit: C
+
+  - entity: binary_sensor
+    translation_key: defrost
+    category: diagnostic
+    dps:
+      - id: 7
+        type: boolean
+        name: sensor
+
+  - entity: select
+    translation_key: heat_pump_mode
+    dps:
+      - id: 2
+        type: string
+        name: option
+        mapping:
+          - dps_val: heating
+            value: heat
+          - dps_val: cold
+            value: cool
+
+  - entity: sensor
+    name: Top tank temperature
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 21
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 18
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+
+  - entity: binary_sensor
+    name: Circulation pump
+    class: running
+    category: diagnostic
+    dps:
+      - id: 30
+        type: boolean
+        name: sensor
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 15
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 15
+        type: bitfield
+        name: fault_code