Procházet zdrojové kódy

feat(devices): add ceiling fan device configuration (#5567)

* feat(tuya_local): add ceiling fan device configuration

Add a new device entry for a ceiling fan with the following details:

- name: Ceiling fan
- product id: 8r39c874v4r9j5yc
- manufacturer: Sofucor
- model: KBS-52144

* feat (sofucor_kbs_fan): changes from review

- Renamed file to match convention
- Renamed color_mode to work_mode, as there is only one valid color mode there, and even scene and music do not have necessary dps to select

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
paradoxisme před 15 hodinami
rodič
revize
61107a3b48

+ 73 - 0
custom_components/tuya_local/devices/sofucor_kbs_fan.yaml

@@ -0,0 +1,73 @@
+name: Ceiling fan
+products:
+  - id: 8r39c874v4r9j5yc
+    manufacturer: Sofucor
+    model: KBS-52144
+entities:
+  - entity: light
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 21
+        type: string
+        name: work_mode
+      - id: 22
+        type: integer
+        name: brightness
+        range:
+          min: 1
+          max: 100
+        mapping:
+          - step: 10
+      - id: 23
+        type: integer
+        name: color_temp
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 3000
+              max: 5000
+            step: 500
+
+  - entity: fan
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 61
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: Natural
+            value: nature
+          - dps_val: WakeUp
+            value: fresh
+      - id: 62
+        type: integer
+        optional: true
+        name: speed
+        range:
+          min: 1
+          max: 6
+      - id: 63
+        type: string
+        optional: true
+        name: direction
+  - entity: number
+    name: Fan timer
+    translation_key: timer
+    category: config
+    icon: "mdi:fan-clock"
+    dps:
+      - id: 64
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 540