Procházet zdrojové kódy

Create varin_va_e003_fan_light.yaml (#4538)

* Create varin_va_e003_fan_light.yaml

Creates support for Varin VA-E003 Smart Ceiling Fan with Light
(sold in NL at bol.com)

* Update varin_va_e003_fan_light.yaml

Updated the file addressing all four points:

Generic top-level name with products section (added product_id ufrvcfjnmhnqebge)
Replaced separate select entity with named_color attribute on auxiliary light
Added preset_mode mapping for DP 106
Added translation_key: fan_with_presets to fan entity

Note: auxiliary light brightness cannot be controlled independently as it is encoded together with color in DP 61 as a single hex value with a fixed 5-byte header.
Mighte1 před 1 týdnem
rodič
revize
17c168779a

+ 117 - 0
custom_components/tuya_local/devices/varin_va_e003_fan_light.yaml

@@ -0,0 +1,117 @@
+name: Fan light
+products:
+  - id: ufrvcfjnmhnqebge
+    manufacturer: Varin
+    model: VA-E003
+entities:
+  - entity: light
+    name: Main Light
+    dps:
+      - id: 63
+        type: boolean
+        name: switch
+      - id: 22
+        type: integer
+        name: brightness
+        optional: true
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        type: integer
+        name: color_temp
+        optional: true
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+
+  - entity: light
+    name: Auxiliary Light
+    dps:
+      - id: 54
+        type: boolean
+        name: switch
+      - id: 55
+        type: string
+        name: effect
+        mapping:
+          - dps_val: colour
+            value: "off"
+          - dps_val: scene
+            value: Scene
+          - dps_val: music
+            value: Music
+      - id: 61
+        type: string
+        name: named_color
+        optional: true
+        mapping:
+          - dps_val: "AAEADAAAAAPoA+g="
+            value: red
+          - dps_val: "AAEADAAAHgPoA+g="
+            value: orange
+          - dps_val: "AAEADAAAPAPoA+g="
+            value: yellow
+          - dps_val: "AAEADAAAWgPoA+g="
+            value: lawngreen
+          - dps_val: "AAEADAAAeAPoA+g="
+            value: green
+          - dps_val: "AAEADAAAtAPoA+g="
+            value: cyan
+          - dps_val: "AAEADAAA8APoA+g="
+            value: blue
+          - dps_val: "AAEADAABDgPoA+g="
+            value: purple
+          - dps_val: "AAEADAABLAPoA+g="
+            value: deeppink
+          - dps_val: "AAEADAAAAAAAA+g="
+            value: white
+          - dps_val: "AAEADAAAAAPoAfQ="
+            value: darkred
+          - dps_val: "AAEADAAA8APoAfQ="
+            value: darkblue
+          - dps_val: "AAEADAAAeAPoAfQ="
+            value: darkgreen
+
+  - entity: switch
+    name: Master Switch
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+
+  - entity: fan
+    translation_key: fan_with_presets
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+      - id: 105
+        type: integer
+        name: speed
+        optional: true
+        range:
+          min: 1
+          max: 6
+      - id: 104
+        type: string
+        name: direction
+        optional: true
+        mapping:
+          - dps_val: forward
+            value: forward
+          - dps_val: reverse
+            value: reverse
+      - id: 106
+        type: string
+        name: preset_mode
+        optional: true
+        mapping:
+          - dps_val: fresh
+            value: fresh
+          - dps_val: nature
+            value: nature