Explorar o código

Add klarstein alinea smart config (#4424)

* Add klarstein alinea smart config

* update space issue in the id

* update spacing

* add review comments

Like:
- generic naming.
- on off switch in fan
- light color
- update countdown.
- and some mapping

* fix (klarstein_alinea_extractorhood): changes to config

- rename file with device type to improve recognisabiltiy
- top level name should be generic in case other products match
- Add target range for color_temp
- use speed rather than presets for fan, as voice assistant support is better.

PR #4424

* fix (klarstein_alinea_extractorhood): don't turn off light by color_temp, quote "Off"

- add quotes to "Off" to avoid mistreating as boolean
- don't allow color temp to go to 0, as that turns off the light.

PR #4424

* feat (klarstein_ava_extractorhood.yaml): rename from Alinea

device is Ava, not Alinea, it is missing the RGB backlight and has color temp control (which is not apparent from the Alinea docs).

PR #4424

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Gerjon hai 1 semana
pai
achega
6de3a28d8c

+ 65 - 0
custom_components/tuya_local/devices/klarstein_ava_extractorhood.yaml

@@ -0,0 +1,65 @@
+name: Extractor hood
+products:
+  - id: zggqz0s1atd9qce4
+    manufacturer: Klarstein
+    model: Ava
+entities:
+  - entity: light
+    dps:
+      - id: 4
+        type: boolean
+        name: switch
+      - id: 102
+        type: integer
+        name: color_temp
+        range:
+          min: 1
+          max: 6
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - id: 103
+        type: integer
+        name: brightness
+        range:
+          min: 1
+          max: 3
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 10
+        type: string
+        name: speed
+        mapping:
+          - dps_val: "Off"
+            value: 0
+          - dps_val: Low
+            value: 25
+          - dps_val: Medium
+            value: 50
+          - dps_val: High
+            value: 75
+          - dps_val: Strong
+            value: 100
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 13
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 100
+  - entity: sensor
+    name: Total Runtime
+    dps:
+      - id: 12
+        type: integer
+        name: sensor
+        class: measurement