Przeglądaj źródła

feat(devices): add support for KMC 4 outlet wall tap

Issue #4750
Jason Rumney 1 dzień temu
rodzic
commit
653415ad38

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -802,3 +802,4 @@ Further device support has been made with the assistance of users. Please consid
 - [djremco](https://github.com/djremco) for contributing improvements to Tonepie T1 Pro cat litter box.
 - [nakatomi845](https://github.com/nakatomi845) for contributing support for Zencar Wpro 32A 3P EV charger.
 - [DomJoke](https://github.com/DomJoke) for contributing support for Hiniso dehumidifier.
+- [c3p0vsr2d2](https://github.com/c3p0vsr2d2) for contributing support for KMC 4-outlet wall tap with energy monitoring.

+ 1 - 0
DEVICES.md

@@ -759,6 +759,7 @@ the best option.
 - Inna/Automat-ON AUTO000014 7 channel underfloor heating controller
 - JH PCIe mini computer switch
 - JH PCIe pro+ computer switch
+- KMC 4-outlet wall tap with energy monitoring
 - LerLink high power switch
 - Linkoze LKWSW201 dual button
 - Logicom Strippy 4 way power strip with USB

+ 91 - 0
custom_components/tuya_local/devices/kmc_powerstrip.yaml

@@ -0,0 +1,91 @@
+name: Powerstrip
+products:
+  - id: ZaXzIupxIMaZlwHx
+    manufacturer: KMC
+    model: Smart tap
+    model_id: "30608"
+entities:
+  - entity: switch
+    translation_key: outlet_x
+    translation_placeholders:
+      x: "1"
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: outlet_x
+    translation_placeholders:
+      x: "2"
+    dps:
+      - id: 2
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: outlet_x
+    translation_placeholders:
+      x: "3"
+    dps:
+      - id: 3
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Add electricity
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 101
+        type: integer
+        optional: true
+        name: sensor
+        unit: kWh
+        mapping:
+          - scale: 1000
+      - id: 109
+        type: integer
+        name: ref
+  - entity: sensor
+    class: current
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: A
+        class: measurement
+        mapping:
+          - scale: 1000
+      - id: 107
+        type: integer
+        name: ref
+  - entity: sensor
+    class: power
+    dps:
+      - id: 103
+        type: integer
+        name: sensor
+        unit: W
+        class: measurement
+      - id: 108
+        type: integer
+        name: ref
+  - entity: sensor
+    class: voltage
+    dps:
+      - id: 104
+        type: integer
+        name: sensor
+        unit: V
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 109
+        type: integer
+        name: ref
+  - entity: sensor
+    name: Factory test result
+    hidden: true
+    category: diagnostic
+    dps:
+      - id: 105
+        type: integer
+        name: sensor