Explorar o código

Add support for WF-WS02 RJ dual switches

Issue #1753
Jason Rumney hai 1 ano
pai
achega
278e0f1684

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -527,3 +527,4 @@ Further device support has been made with the assistance of users. Please consid
 - [airwebber](https://github.com/airwebber) for assisting with support for Orison ceiling fans with RGB lights.
 ^ [cherokee13](https://github.com/cherokee13) for assisting with support for Eruiklink curtain motors.
 - [Szenky](https://github.com/Szensky) for assisting with support for Moes WS-Y-EUC curtain switches.
+- [Aironside](https://github.com/Aironside) for assisting with support for WF-WS02 RJ dual switches.

+ 1 - 0
DEVICES.md

@@ -404,6 +404,7 @@ the best option.
 - Somgam double wall switch
 - Teckin SS42 outdoor double smartplug
 - Tellur 3 outlet + USB power strip with individual timers
+- WF-WS02 RJ dual switch with master
 - Woox R4028/DIGOO DG-PS01 3 outlet + USB powerstrip with individual timers
 
 Other brands may work with the above configurations, or the below are

+ 33 - 0
custom_components/tuya_local/devices/wfws02rj_dual_switch.yaml

@@ -0,0 +1,33 @@
+name: Dual switch
+products:
+  - id: LOeuvI6KCxzuZe0k
+    name: WF-WS02 RJ
+primary_entity:
+  entity: switch
+  name: Master
+  class: switch
+  category: config
+  dps:
+    - id: 5
+      type: integer
+      name: switch
+      mapping:
+        - dps_val: 1
+          value: true
+        - dps_val: 0
+          value: false
+secondary_entities:
+  - entity: switch
+    name: Switch 1
+    class: switch
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Switch 2
+    class: switch
+    dps:
+      - id: 2
+        type: boolean
+        name: switch