Просмотр исходного кода

feat(windcalm_fan_with_light): add compatible Forlight Nere fan

PR #5491 by @irikuo

- made sound switch hidden if unavailable, as Nere does not have this
- added light timer (hidden if unavailable) which Nere has
Jason Rumney 5 дней назад
Родитель
Сommit
6be018e4bf
1 измененных файлов с 35 добавлено и 0 удалено
  1. 35 0
      custom_components/tuya_local/devices/windcalm_fan_with_light.yaml

+ 35 - 0
custom_components/tuya_local/devices/windcalm_fan_with_light.yaml

@@ -1,4 +1,8 @@
 name: Ceiling fan with light
+products:
+  - id: b3uwmntqtdozwin
+    manufacturer: Forlight
+    model: Nere
 entities:
   - entity: fan
     dps:
@@ -51,8 +55,39 @@ entities:
   - entity: switch
     translation_key: sound
     category: config
+    hidden: unavailable
     dps:
       - id: 66
         type: boolean
         name: switch
         optional: true
+      - id: 66
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: number
+    class: duration
+    translation_key: timer
+    name: Light timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 540
+      - id: 26
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true