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

feat(devices): add support for Aziot 4 gang switch

Issue #3603
Jason Rumney 5 месяцев назад
Родитель
Сommit
1200c930b5
3 измененных файлов с 139 добавлено и 2 удалено
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 1
      DEVICES.md
  3. 137 0
      custom_components/tuya_local/devices/aziot_quad_switch.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -1015,7 +1015,7 @@ Further device support has been made with the assistance of users. Please consid
 - [JakubMadro](https://github.com/JakubMadro) for contributing support for EARU PC473 3-phase energy monitor.
 - [jlg78fr](https://github.com/jlg78fr) for assisting with support for Unistyle WT-04W water timer.
 - [KoenVanduffel](https://github.com/KoenVanduffel) for assisting with support for Oscal PowerMax 6000 portable power station.
-- [pranjal-joshi](https://github.com/pranjal-joshi) for contributing support for Aziot 7 and 8 gang multi-switches.
+- [pranjal-joshi](https://github.com/pranjal-joshi) for contributing support for Aziot 7 and 8 gang multi-switches and assisting with support for Aziot 4 gang switches.
 - [AFumi39](https://github.com/AFumi39) for contributing support for Puppy Kitty F14-W pet feeder.
 - [hussainaljamri](https://github.com/hussainaljamri) for contributing support for Moes Star Feather series switches.
 - [FritzeF](https://github.com/FritzeF) for assisting with support for Kavunion C1 100 ventilation fan.

+ 1 - 1
DEVICES.md

@@ -566,7 +566,7 @@ the best option.
 - Arlec PB88UHA 4 way powerstrip with child lock
 - Aubess 1-gang switch with energy monitoring
 - Aubess 2 and 3-gang switches
-- Aziot 7 and 8 gang multi-switches
+- Aziot 4, 7 and 8 gang multi-switches
 - Bauhn APSW-0624 5 way powerstrip (with unswitched USB)
 - BBCoin AC5299 PCIe computer switch
 - Blitzwolf BW-SHP6 PRO smartplug with child lock

+ 137 - 0
custom_components/tuya_local/devices/aziot_quad_switch.yaml

@@ -0,0 +1,137 @@
+name: Quad switch
+products:
+  - id: vbjatuxv6yoezkk5
+    manufacturer: Aziot
+    model: 4 Node smart switch
+entities:
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "3"
+    dps:
+      - id: 3
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "4"
+    dps:
+      - id: 4
+        type: boolean
+        name: switch
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 7
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 8
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "3"
+    dps:
+      - id: 9
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "4"
+    dps:
+      - id: 10
+        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: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+          - dps_val: memory
+            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: Schedule
+    category: config
+    icon: "mdi:home-clock"
+    hidden: true
+    dps:
+      - id: 17
+        type: string
+        name: value
+  - entity: text
+    name: Random schedule
+    category: config
+    icon: "mdi:airplane-clock"
+    hidden: true
+    dps:
+      - id: 18
+        type: string
+        name: value
+  - entity: text
+    name: Inching
+    category: config
+    icon: "mdi:toggle-switch"
+    hidden: true
+    dps:
+      - id: 19
+        type: string
+        name: value