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

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 4 дней назад
Родитель
Сommit
11b6b05dd6
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      custom_components/tuya_local/devices/yidi_fan_light_switch.yaml

+ 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