Procházet zdrojové kódy

Add support for Eurom Mon Soleil DSP and Sani devices (#3765)

* Add support for Eurom Mon Soleil DSP and Sani devices
* Mark Sani countdown DP as optional everywhere
* Rename Countdown switch to Timer
* Map schedule to hidden text entity
* Introduce select to configure schedule mode
* feat (eurom_sani_heater): changes from review
- default temperature unit to celsius in case it is not specified by the device
- expose temperature unit as select entity
- use translation for timer

PR #3765

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Pieter Maene před 4 měsíci
rodič
revize
1f8de7c853

+ 2 - 0
DEVICES.md

@@ -27,8 +27,10 @@
 - Eurom Alutherm 1000,1500,2000,2500 heaters
 - Eurom Hot-Shot 2000 heaters
 - Eurom Mon Soleil 300,600,800, 350,601,720 and 300,450,720 Verre heaters
+- Eurom Mon Soleil DSP 400,650,770 heaters
 - Eurom Sani heated towel rail
 - Eurom Sani Wall Heat 2000 and Wall Designheat 2000 heaters
+- Eurom Sani 400,600,800 heaters
 - Goldair GPPH, GCPV, GECO and PH-ET heaters
 - Hama radiator controller
 - Heatstorm DH-100-TWI, HS-1500 and HS-6000-GC heaters

+ 82 - 0
custom_components/tuya_local/devices/eurom_dsp_heater.yaml

@@ -0,0 +1,82 @@
+name: Heater
+products:
+  - id: wv9d5ocs76u6maqj
+    manufacturer: Eurom
+    model: Mon Soleil DSP 400
+entities:
+  - entity: climate
+    translation_only_key: heater
+    dps:
+      - id: 1
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: mode
+            conditions:
+              - dps_val: m
+                value: heat
+              - dps_val: p
+                value: auto
+      - id: 2
+        name: temperature
+        type: integer
+        unit: C
+        range:
+          min: 0
+          max: 37
+      - id: 3
+        name: current_temperature
+        type: integer
+      - id: 4
+        name: mode
+        type: string
+        hidden: true
+      - id: 102
+        type: boolean
+        name: preset_mode
+        mapping:
+          - dps_val: false
+            value: none
+          - dps_val: true
+            value: eco
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 12
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 12
+        type: bitfield
+        name: fault_code
+  - entity: text
+    name: Schedule
+    icon: "mdi:calendar-clock"
+    category: config
+    hidden: true
+    dps:
+      - id: 103
+        type: string
+        name: value
+        optional: true
+  - entity: select
+    name: Schedule mode
+    icon: "mdi:calendar-clock"
+    category: config
+    dps:
+      - id: 104
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: holiday
+            value: Holiday
+          - dps_val: program
+            value: Program

+ 124 - 0
custom_components/tuya_local/devices/eurom_sani_heater.yaml

@@ -0,0 +1,124 @@
+name: Heater
+products:
+  - id: vx9tbbzhfmcc0f3k
+    manufacturer: Eurom
+    model: Sani 800
+entities:
+  - entity: climate
+    translation_only_key: heater
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat
+      - id: 2
+        type: integer
+        name: temperature
+        range:
+          min: 0
+          max: 99
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: true
+                value_redirect: temp_set_f
+                range:
+                  min: 32
+                  max: 99
+              - dps_val: false
+                range:
+                  min: 0
+                  max: 37
+      - id: 3
+        type: integer
+        name: temp_set_f
+        optional: true
+        hidden: true
+        range:
+          min: 32
+          max: 99
+      - id: 4
+        type: boolean
+        name: temperature_unit
+        optional: true
+        mapping:
+          - dps_val: true
+            value: F
+          - value: C
+      - id: 5
+        type: integer
+        name: current_temperature
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: true
+                value_redirect: temp_current_f
+      - id: 6
+        type: integer
+        name: temp_current_f
+        optional: true
+        hidden: true
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 7
+        type: integer
+        name: minute
+        range:
+          min: 0
+          max: 1440
+      - id: 8
+        type: boolean
+        name: available
+        optional: true
+  - entity: switch
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 8
+        type: boolean
+        name: switch
+        optional: true
+  - entity: text
+    name: Schedule
+    icon: "mdi:calendar-clock"
+    category: config
+    hidden: true
+    dps:
+      - id: 9
+        type: string
+        name: value
+        optional: true
+  - entity: select
+    name: Schedule mode
+    icon: "mdi:calendar-clock"
+    category: config
+    dps:
+      - id: 10
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: holiday
+            value: Holiday
+          - dps_val: program
+            value: Program
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 4
+        type: boolean
+        optional: true
+        name: option
+        mapping:
+          - dps_val: false
+            value: celsius
+          - dps_val: true
+            value: fahrenheit