Jelajahi Sumber

feat (devices): TY-12W relay board

Limited information available for this device, so only switches are
implemented, no configuration entities.

Issue #3007
Jason Rumney 2 bulan lalu
induk
melakukan
0b5150ee22

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1128,3 +1128,4 @@ Further device support has been made with the assistance of users. Please consid
 - [brendanlees](https://github.com/brendanlees) for contributing support for Fanco Infinity, which was merged with existing Fanco Eco Silent.
 - [widegaint](https://github.com/widegaint) for assisting with support for dLuft Smart Flow ventilation fan.
 - [felixfx2](https://github.com/felixfx2) for assisting with support for Prism+ Oasis Pro ceiling fan with RGBCCT light.
+- [toby121](https://github.com/toby121) for assisting with support for TY-12W 12 switch relay board.

+ 1 - 0
DEVICES.md

@@ -659,6 +659,7 @@ the best option.
 - Somgam double wall switch
 - Teckin SS42 outdoor double smartplug
 - Tellur 3 outlet + USB power strip with individual timers
+- TY-12W 12 switch relay board
 - WF-WS02 RJ dual switch with master
 - Woox R4028/DIGOO DG-PS01 3 outlet + USB powerstrip with individual timers
 

+ 98 - 0
custom_components/tuya_local/devices/ty12w_relayboard.yaml

@@ -0,0 +1,98 @@
+name: Relay board
+entities:
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 2
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "3"
+    dps:
+      - id: 3
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "4"
+    dps:
+      - id: 4
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "5"
+    dps:
+      - id: 5
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "6"
+    dps:
+      - id: 6
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "7"
+    dps:
+      - id: 101
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "8"
+    dps:
+      - id: 102
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "9"
+    dps:
+      - id: 103
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "10"
+    dps:
+      - id: 104
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "11"
+    dps:
+      - id: 105
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "12"
+    dps:
+      - id: 106
+        name: switch
+        type: boolean