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

Add support for Yidi fan and light wall switch.

Issue #993
Jason Rumney 2 лет назад
Родитель
Сommit
fe1930b2b6
3 измененных файлов с 66 добавлено и 1 удалено
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 64 0
      custom_components/tuya_local/devices/yidi_fan_light_switch.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -325,7 +325,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [nicopret1](https://github.com/nicopret1) for assistance with support for ITS-4.5HD super pool heatpumps.
 - [simposiummm](https://github.com/simposiummm) for assistance with support for Sulion ceiling fans.
 - [mbakhtin](https://github.com/mbakhtin) for contributing support for Inkbird IBS-M1S thermo-probe hubs.
-- [Levanterman](https://github.com/Levanterman) for contributing support for LoraTap double curtain switches.
+- [Levanterman](https://github.com/Levanterman) for contributing support for LoraTap double curtain switches and assistance with Yidi fan and light switches.
 - [WallyCZ](https://github.com/WallyCZ) for contributing support for Sencor air conditioners.
 - [lageorgem](https://github.com/lageorgem) for contributing support for Loginovo TV sync backlights.
 - [jaymunro](https://github.com/jaymunro) for contributing support for Makegood dual switches.

+ 1 - 0
DEVICES.md

@@ -144,6 +144,7 @@
 - Treatlife DS02-F fan switch
 - Treatlife DS03 fan with dimmable light
 - Windcalm ceiling fans with and without cool.warm white dimmable light
+- Yidi/NHZS fan and light wall switch
 
 ### Air Purifiers
 

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

@@ -0,0 +1,64 @@
+name: Wall switch
+products:
+  - id: 66urzkokqdufersv
+    name: NHZS Fan and light switch
+primary_entity:
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 4
+        type: integer
+        name: speed
+        range:
+          min: 0
+          max: 100
+secondary_entites:
+  - entity: light
+    dps:
+      - id: 5
+        type: boolean
+        name: switch
+  - entity: number
+    name: Fan timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 2
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    name: Initial state
+    icon: "mdi:toggle-switch"
+    category: config
+    dps:
+      - id: 11
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: "on"
+            value: "On"
+          - dps_val: "memory"
+            value: Last state
+        optional: true
+  - entity: light
+    name: Backlight
+    icon: "mdi:television-ambient-light"
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: switch
+
+
+