Sfoglia il codice sorgente

Add support for Grid Connect USB charger with power socket

Issue #291
Jason Rumney 3 anni fa
parent
commit
f82f13f2fe

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -143,3 +143,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [EnginDzhemil](https://github.com/EnginDzhemil) for contributing support for single switches with backlight.
 - [billxinli](https://github.com/billxinli) for contributing support for Honeywell TP dehumidifiers.
 - [isarib01](https://github.com/isarib01) for assistance supporting Deta motion sensor lights.
+- [iDontWantAUsername](https://github.com/iDontWantAUsername) for assistance supporting Grid Connect USB charger with power socket.

+ 2 - 1
DEVICES.md

@@ -166,7 +166,8 @@
 - DIGOO DG-SP01 USB smartplug with night light.
 - ES01 3 outlet + USB powerstrip with individual timers.
 - Grid Connect double outlet wall socket
-- Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock.
+- Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock
+- Grid Connect USB charger with power socket
 - Logicom Strippy 4 way power strip with USB
 - Mirabella Genio smartplug with USB
 - MoesHouse smartplug with RGBW nightlight

+ 76 - 0
custom_components/tuya_local/devices/grid_connect_usb_power_point.yaml

@@ -0,0 +1,76 @@
+name: Grid Connect USB charger with power socket
+primary_entity:
+  entity: switch
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+secondary_entities:
+  - entity: switch
+    name: USB
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: number
+    name: Outlet timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 9
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+        unit: mi
+  - entity: number
+    name: USB timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 10
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+        unit: min
+  - entity: select
+    name: Initial state
+    category: config
+    icon: "mdi:toggle-switch"
+    dps:
+      - id: 38
+        type: string
+        name: option
+        mapping:
+          - dps_val: power_off
+            value: "Off"
+          - dps_val: power_on
+            value: "On"
+          - dps_val: last
+            value: Keep state
+  - entity: lock
+    name: Child lock
+    category: config
+    icon: "mdi:hand-back-right-off"
+    dps:
+      - id: 41
+        type: boolean
+        name: lock
+  - entity: switch
+    name: Auto-off
+    category: config
+    icon: "mdi:camera-timer"
+    dps:
+      - id: 44
+        type: boolean
+        name: switch