Преглед изворни кода

feat(devices): add Varin VA-002 ceiling fan light (#5455)

* Add conf for Varin VA-002 based on the VA-003

* Add device id and add timer

Updated the device configuration for the fan light, including renaming and adding a fan timer entity.

* Refactor Fan timer entity fix

* Update product ID for Varin VA-002

* Fix casing in fan light name and value field

* Fix indentation for 'name'

* Update entities id for VA-E002 fan light

* Rename varin_va_e002_ceiling_fan_light.yaml file

* Add icons for ceiling fan light and fan entities

* Remove unnecessary mapping from ceiling fan light config

Removed mapping for direction values in ceiling fan light configuration.

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Clément Radenac пре 1 недеља
родитељ
комит
20e8617334

+ 70 - 0
custom_components/tuya_local/devices/varin_va_e002_ceiling_fan_light.yaml

@@ -0,0 +1,70 @@
+name: Ceiling fan light
+products:
+  - id: vfqiwthdnlkynebk
+    manufacturer: Varin
+    model: VA-E002
+entities:
+  - entity: light
+    icon: "mdi:ceiling-fan-light"
+    dps:
+      - id: 20
+        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: fan
+    translation_key: fan_with_presets
+    icon: "mdi:ceiling-fan"
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 61
+        type: string
+        name: preset_mode
+        optional: true
+        mapping:
+          - dps_val: fresh
+            value: fresh
+          - dps_val: nature
+            value: nature
+      - id: 62
+        type: integer
+        name: speed
+        optional: true
+        range:
+          min: 1
+          max: 6
+      - id: 63
+        type: string
+        name: direction
+        optional: true
+  - entity: number
+    translation_key: timer
+    icon: "mdi:fan-clock"
+    category: config
+    dps:
+      - id: 64
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 540