4
0
Эх сурвалжийг харах

feat(yidi_fan_light_switch): support non-light variant

This seems to be a common whitelabel manufacturer, identifying as NHZS
in the Tuya cloud info, but selling also as Moes. There is an existing
fan only config in nhzs_fan_switch, but it has a 1-20 speed range instead
of the 1-100 range of this one.

PR #5506 by @witanage
Jason Rumney 2 сар өмнө
parent
commit
11b6b05dd6

+ 10 - 0
custom_components/tuya_local/devices/yidi_fan_light_switch.yaml

@@ -16,10 +16,20 @@ entities:
           min: 1
           max: 100
   - entity: light
+    hidden: unavailable
     dps:
       - id: 5
         type: boolean
+        optional: true
         name: switch
+      - id: 5
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: time
     category: config
     translation_key: timer