Преглед изворни кода

feat(devices): add support for LerLink high power switch

Issue #3467
Jason Rumney пре 7 месеци
родитељ
комит
2ec4166fe0
3 измењених фајлова са 79 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 77 0
      custom_components/tuya_local/devices/lerlink_highpower_switch.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1001,3 +1001,4 @@ Further device support has been made with the assistance of users. Please consid
 - [jpbede](https://github.com/jpbede) for contributing support for Poolex Mag FI pool heat pump.
 - [kane-tix](https://github.com/kane-tix) for assisting with support for ADPOW EV charger.
 - [psiberfunk](https://github.com/psiberfunk) for assisting with support for Bcetasy 18-in-1 air quality monitor.
+- [Raggaboi](https://github.com/Raggaboi) for assisting with support for LerLink high power switch.

+ 1 - 0
DEVICES.md

@@ -578,6 +578,7 @@ the best option.
 - Inna/Automat-ON AUTO000014 7 channel underfloor heating controller
 - JH PCIe mini computer switch
 - JH PCIe pro+ computer switch
+- LerLink high power switch
 - Linkoze LKWSW201 dual button
 - Logicom Strippy 4 way power strip with USB
 - Loratap RR400W-V2 relay switch

+ 77 - 0
custom_components/tuya_local/devices/lerlink_highpower_switch.yaml

@@ -0,0 +1,77 @@
+name: Smart switch
+products:
+  - id: rdvedq5bdkio96t1
+    manufacturer: LerLink
+    model: WBH01
+entities:
+  - entity: switch
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 7
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 14
+        type: string
+        name: option
+        mapping:
+          - dps_val: power_off
+            value: "off"
+          - dps_val: power_on
+            value: "on"
+          - dps_val: last
+            value: memory
+  - entity: select
+    translation_key: light_mode
+    category: config
+    dps:
+      - id: 15
+        type: string
+        name: option
+        mapping:
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: locator
+          - dps_val: none
+            value: "off"
+  - entity: text
+    name: Regular schedule
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
+      - id: 17
+        type: string
+        name: value
+  - entity: text
+    name: Random schedule
+    category: config
+    icon: "mdi:home-clock"
+    hidden: true
+    dps:
+      - id: 18
+        type: string
+        name: value
+  - entity: text
+    name: Inching
+    category: config
+    icon: "mdi:timer-refresh"
+    hidden: true
+    dps:
+      - id: 19
+        type: string
+        optional: true
+        name: value