Ver Fonte

Add Lebenlang LBL0380 heater (#4099)

* Added Lebenlang LBL0380 heater

* Add Lebenlang LBL0380 heater to devices list

* Refactor preset_mode mapping to use translations

- Updated preset_mode values to use lowercase and removed unnecessary quotes.
- remove measurement class from countdown, it is not really a measurement and it does not need to use space for long term statistics.

PR #4099

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
OneX92 há 2 meses atrás
pai
commit
2497c2eb3a

+ 1 - 0
DEVICES.md

@@ -48,6 +48,7 @@
 - Kogan flame effect heater - KAWHMFP20BA model
 - Kogan tower heater - KASTHFP2KWA model
 - Kogan panel heaters - KAHTP, KAWFHTP, KASMGPH models
+- Lebenlang LBL0380 heater
 - Lehmann LHOHC-2013C electric radiator
 - Livn Arosa electric fireplace
 - Mellerware Comfy electric radiator (tested with Medium 1200W)

+ 84 - 0
custom_components/tuya_local/devices/lebenlang_lbl0380_heater.yaml

@@ -0,0 +1,84 @@
+name: Heater
+products:
+  - id: b4uubn7bbge7a1pj
+    manufacturer: Lebenlang
+    model: LBL0380
+entities:
+  - entity: climate
+    translation_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
+        unit: C
+        range:
+          min: 0
+          max: 37
+      - id: 3
+        type: integer
+        name: current_temperature
+      - id: 5
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: level_1
+            value: low
+          - dps_val: level_2
+            value: medium
+          - dps_val: level_3
+            value: high
+      - id: 11
+        type: string
+        name: hvac_action
+        mapping:
+          - dps_val: heating
+            value: heating
+          - dps_val: standby
+            value: idle
+          - dps_val: open
+            value: idle
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 19
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: "1h"
+            value: "1h"
+          - dps_val: "2h"
+            value: "2h"
+          - dps_val: "3h"
+            value: "3h"
+          - dps_val: "4h"
+            value: "4h"
+          - dps_val: "5h"
+            value: "5h"
+          - dps_val: "6h"
+            value: "6h"
+          - dps_val: "7h"
+            value: "7h"
+          - dps_val: "8h"
+            value: "8h"
+          - dps_val: "9h"
+            value: "9h"
+  - entity: sensor
+    class: duration
+    translation_key: time_remaining
+    category: diagnostic
+    dps:
+      - id: 20
+        type: integer
+        name: sensor
+        unit: min