Ver Fonte

Add support for USB + 4-way powerstrips such as AOFO ZLD-44EU-W

Issue #411
Jason Rumney há 3 anos atrás
pai
commit
432f0c13b0

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -185,3 +185,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [ruaandeysel](https://github.com/ruaandeysel) for assistance supporting Skyfan DC fans.
 - [ruaandeysel](https://github.com/ruaandeysel) for assistance supporting Skyfan DC fans.
 - [DataGeek-AU](https://github.com/DataGeek-AU) for contributing support for Breville Easy Air purifiers.
 - [DataGeek-AU](https://github.com/DataGeek-AU) for contributing support for Breville Easy Air purifiers.
 - [Clam58](https://github.com/Clam58) for contributing support for Ebac DJ4000 dehumidifierss.
 - [Clam58](https://github.com/Clam58) for contributing support for Ebac DJ4000 dehumidifierss.
+- [rafazundt](https://github.com/rafazundt) for assisting with support for AOFO ZLD and other 4-way+USB powerstrips.

+ 3 - 1
DEVICES.md

@@ -203,10 +203,12 @@ Other brands may work with the above configurations, or the below are
 generic configurations known to work with multiple brands of device.
 generic configurations known to work with multiple brands of device.
 
 
 - 4 way power monitoring strip
 - 4 way power monitoring strip
+- 4 way powerstrip with USB
+  _confirmed as working with AOFO ZLD-44EU-W_
 - Generic smartplug with energy monitoring (older models)
 - Generic smartplug with energy monitoring (older models)
   _confirmed as working with Kogan and Blitzwolf single smartplugs_
   _confirmed as working with Kogan and Blitzwolf single smartplugs_
 - Generic smartplug with energy monitoring (newer models)
 - Generic smartplug with energy monitoring (newer models)
-  _confirmed working with Kogan single smartplug with USB and Rillpac smartplugs_
+  _confirmed as working with Kogan single smartplug with USB and Rillpac smartplugs_
 - Generic smartplug with more advanced energy monitoring
 - Generic smartplug with more advanced energy monitoring
   _confirmed working with CBE smartplugs, another variant with child lock, backlight and inching switch confirmed with Aubess and Elivco_
   _confirmed working with CBE smartplugs, another variant with child lock, backlight and inching switch confirmed with Aubess and Elivco_
 - Generic smartplug with some additional encoded schedule info.
 - Generic smartplug with some additional encoded schedule info.

+ 117 - 0
custom_components/tuya_local/devices/usb_4way_powerstrip.yaml

@@ -0,0 +1,117 @@
+name: USB 4way powerstrip
+products:
+  - id: D7Hl3AxFbHDS98iO
+    name: AOFO ZLD-44EU-W
+primary_entity:
+  entity: switch
+  name: Outlet 1
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: switch
+    name: Outlet 2
+    class: outlet
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Outlet 3
+    class: outlet
+    dps:
+      - id: 3
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Outlet 4
+    class: outlet
+    dps:
+      - id: 4
+        type: boolean
+        name: switch
+  - entity: switch
+    name: USB
+    dps:
+      - id: 7
+        type: boolean
+        name: switch
+  - entity: number
+    name: Timer 1
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: Timer 2
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: Timer 3
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: Timer 4
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 104
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: number
+    name: USB Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+
+