Procházet zdrojové kódy

Add Klarstein Bornholm (version based on WBR3, with 1kW) (#4255)

* feat: Klarstein Bornholm + toggle display control

* fix: make it testable

* fix: dp5 - flip true/false; dp102 - add light

* fix: dp102 - light together with dp5

* fix(custom_components/tuya_local): adapt to new fields format

* feat(custom_components/tuya_local): minor optional update

* Revert "fix: dp102 - light together with dp5"

This reverts commit aa6d796655490452f20df4607dc93c45d521fe02. See https://github.com/make-all/tuya-local/pull/4255/commits/aa6d796655490452f20df4607dc93c45d521fe02#r2666566128
maricn před 1 měsícem
rodič
revize
6bbdb7e82a

+ 1 - 0
DEVICES.md

@@ -47,6 +47,7 @@
 - Kennedy II/JR electric fireplace
 - Kesser Infrared 400W wall and 3000W heaters with and without lights.
 - Klarstein Bornholm Smart 1500 convection heater
+- Klarstein Bornholm Electric heater (1kW, based on WBR3)
 - Klarstein Wonderwall IR heaters (including Air Art, Bornholm, 600 models)
 - Kogan flame effect heater - KAWHMFP20BA model
 - Kogan tower heater - KASTHFP2KWA model

+ 180 - 0
custom_components/tuya_local/devices/klarstein_bornholm_smart_heater.yaml

@@ -0,0 +1,180 @@
+name: Heater
+products:
+  - id: dcxerfhhzu2x1bei
+    manufacturer: Klarstein
+    model: Bornholm (1kW, based on WBR3)
+entities:
+  - entity: climate
+    translation_key: heater
+    dps:
+      - id: 1
+        name: hvac_mode
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat
+      - id: 2
+        name: temperature
+        type: integer
+        unit: C
+        range:
+          min: 5
+          max: 45
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: F
+                range:
+                  min: 41
+                  max: 113
+      - id: 3
+        name: current_temperature
+        type: integer
+      - id: 4
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: low
+            value: eco
+          - dps_val: high
+            value: boost
+      - id: 101
+        name: hvac_action
+        type: boolean
+        mapping:
+          - dps_val: false
+            value: idle
+          - dps_val: true
+            value: heating
+      - id: 103
+        name: temperature_unit
+        type: string
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 5
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
+  - entity: light
+    translation_key: display_light
+    category: config
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 6
+        type: boolean
+        name: lock
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 10
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: cancel
+          - dps_val: "1"
+            value: "1h"
+          - dps_val: "2"
+            value: "2h"
+          - dps_val: "3"
+            value: "3h"
+          - dps_val: "4"
+            value: "4h"
+          - dps_val: "5"
+            value: "5h"
+          - dps_val: "6"
+            value: "6h"
+          - dps_val: "7"
+            value: "7h"
+          - dps_val: "8"
+            value: "8h"
+          - dps_val: "9"
+            value: "9h"
+          - dps_val: "10"
+            value: "10h"
+          - dps_val: "11"
+            value: "11h"
+          - dps_val: "12"
+            value: "12h"
+          - dps_val: "13"
+            value: "13h"
+          - dps_val: "14"
+            value: "14h"
+          - dps_val: "15"
+            value: "15h"
+          - dps_val: "16"
+            value: "16h"
+          - dps_val: "17"
+            value: "17h"
+          - dps_val: "18"
+            value: "18h"
+          - dps_val: "19"
+            value: "19h"
+          - dps_val: "20"
+            value: "20h"
+          - dps_val: "21"
+            value: "21h"
+          - dps_val: "22"
+            value: "22h"
+          - dps_val: "23"
+            value: "23h"
+          - dps_val: "24"
+            value: "24h"
+  - entity: sensor
+    translation_key: time_remaining
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 11
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+        class: measurement
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 12
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 12
+        name: fault_code
+        optional: true
+        type: bitfield
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 103
+        type: string
+        name: option
+        mapping:
+          - dps_val: C
+            value: celsius
+          - dps_val: F
+            value: fahrenheit