Sfoglia il codice sorgente

feat(devices): add CE Smart Home Litesun smart plug

Issue #5092
Jason Rumney 1 mese fa
parent
commit
e855b696d5

+ 1 - 1
DEVICES.md

@@ -747,7 +747,7 @@ the best option.
 - Brilliant 1/2/3/4 gang wall switches with power monitoring
 - Brilliant quad powerstrip with USB
 - CBI Astute smart controller
-- CE Smart Home LQ-2-W3 AC wall outlet
+- CE Smart Home LQ-2-W3 AC wall outlet, Litesun smart plug
 - Denver SHP-200mk2 dual smartplug with power monitoring
 - DIGOO DG-SP202 dual smartplug with energy monitoring and timers
 - DIGOO DG-SP01 USB smartplug with night light

+ 78 - 0
custom_components/tuya_local/devices/cesmarthome_monitoring_smartplug.yaml

@@ -0,0 +1,78 @@
+name: Smart plug
+# products:
+#   - id: UNKNOWN
+#     manufacturer: CE Smart Home
+#     model: Litesun
+entities:
+  - entity: switch
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 7
+        type: integer
+        optional: true
+        name: test_result
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 2
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86399
+  - entity: sensor
+    name: Add electricity
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 3
+        type: integer
+        optional: true
+        persist: false
+        name: sensor
+        unit: kWh
+        mapping:
+          - scale: 1000
+      - id: 11
+        type: integer
+        optional: true
+        name: calibration
+  - entity: sensor
+    class: current
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: mA
+        class: measurement
+      - id: 9
+        type: integer
+        optional: true
+        name: calibration
+  - entity: sensor
+    class: power
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        unit: W
+        class: measurement
+      - id: 10
+        type: integer
+        optional: true
+        name: calibration
+  - entity: sensor
+    class: voltage
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: V
+        class: measurement
+      - id: 8
+        type: integer
+        optional: true
+        name: calibration