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

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 пре 6 дана
родитељ
комит
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
 name: Ceiling fan with light
+products:
+  - id: b3uwmntqtdozwin
+    manufacturer: Forlight
+    model: Nere
 entities:
 entities:
   - entity: fan
   - entity: fan
     dps:
     dps:
@@ -51,8 +55,39 @@ entities:
   - entity: switch
   - entity: switch
     translation_key: sound
     translation_key: sound
     category: config
     category: config
+    hidden: unavailable
     dps:
     dps:
       - id: 66
       - id: 66
         type: boolean
         type: boolean
         name: switch
         name: switch
         optional: true
         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