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

Add support for Elivco smartplugs.

Issue #392
Jason Rumney 3 лет назад
Родитель
Сommit
5612f9ec5f
3 измененных файлов с 144 добавлено и 1 удалено
  1. 2 1
      ACKNOWLEDGEMENTS.md
  2. 2 0
      DEVICES.md
  3. 140 0
      custom_components/tuya_local/devices/elivco_smartplug.yaml

+ 2 - 1
ACKNOWLEDGEMENTS.md

@@ -170,7 +170,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [mypixies](https://github.com/mypixies) for assisting with support for Moes dimmer switch.
 - [BeardedTinker](https://github.com/BeardedTinker) for assisting with support for SG600MD smart inverter.
 - [LeandroIssa](https://github.com/LeandroIssa) for contributing Brazilian Portuguese translations.
-- [YuriiMaiboroda](https://github.com/YuriiMaiboroda) for contributing Ukrainian translations.
+- [YuriiMaiboroda](https://github.com/YuriiMaiboroda) for contributing Ukrainian translations and assistance supporting Elivco smartplugs.
 - [samios88](https://github.com/samios88) for assistance supporting Nedis pet feeders.
 - [janchrillesen](https://github.com/janchrillesen) for assistance supporting Nedis air quality monitors.
 - [Celezak](https://github.com/Celezak) for assistance supporting Qnect 3 outlet + USB powerstrips.
@@ -178,3 +178,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [garry0garry](https://github.com/garry0garry) for assistance supporting TOMPD circuit breakers.
 - [romicaiarca](https://github.com/romicaiarca) for contributing Aleco D12 Home dehumidifier support.
 - [spitfire](https://github.com/spitfire) for assistance supporting Gosund P1 powerstrips.
+- [berdahl](https://github.com/bergdahl) for contributing support for Stadler Eva humidifiers.

+ 2 - 0
DEVICES.md

@@ -145,6 +145,7 @@
 - BlitzWolf BWSH5 humidifier
 - Eanons QT-JS2014 purifying humidifier
 - Kyvol EA200 humidifier
+- Stadler Eva humidifier
 - Wetair WAW-H1210LW humidifier
 - Wilfa Haze HU400BC humidifier
 
@@ -178,6 +179,7 @@
 - DIGOO DG-SP202 dual smartplug with energy monitoring and timers
 - DIGOO DG-SP01 USB smartplug with night light
 - Dual power monitoring smartplug (Geex)
+- Elivco energy monitoring smartplug
 - ES01 3 outlet + USB powerstrip with individual timers
 - Gosund P1 3 outlet + USB powerstrip with power monitoring
 - Grid Connect double outlet wall socket

+ 140 - 0
custom_components/tuya_local/devices/elivco_smartplug.yaml

@@ -0,0 +1,140 @@
+name: Energy monitoring smartplug
+products:
+  - id: wrz6vzch8htux2zp
+    name: Elivco CB2S-16DL
+primary_entity:
+  entity: switch
+  class: outlet
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 21
+      type: integer
+      name: test_bit
+    - id: 25
+      type: integer
+      name: energy_calibration
+    - id: 26
+      type: bitfield
+      name: fault_code
+    - id: 42
+      type: base64
+      name: cycle_timer
+    - id: 43
+      type: base64
+      name: random_timer
+    - id: 44
+      type: base64
+      name: inching
+secondary_entities:
+  - entity: number
+    category: config
+    name: Timer
+    icon: "mdi:timer"
+    dps:
+      - id: 9
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: sensor
+    category: diagnostic
+    class: current
+    name: Current
+    dps:
+      - id: 18
+        name: sensor
+        type: integer
+        class: measurement
+        unit: mA
+      - id: 23
+        type: integer
+        name: calibration
+  - entity: sensor
+    category: diagnostic
+    class: power
+    name: Power
+    dps:
+      - id: 19
+        name: sensor
+        type: integer
+        class: measurement
+        unit: W
+        mapping:
+          - scale: 10
+      - id: 24
+        type: integer
+        name: calibration
+  - entity: sensor
+    category: diagnostic
+    class: voltage
+    name: Voltage
+    dps:
+      - id: 20
+        name: sensor
+        type: integer
+        class: measurement
+        unit: V
+        mapping:
+          - scale: 10
+      - id: 22
+        type: integer
+        name: calibration
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    name: Error
+    dps:
+      - id: 26
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: select
+    category: config
+    name: Initial state
+    icon: "mdi:toggle-switch"
+    dps:
+      - id: 38
+        type: string
+        name: option
+        mapping:
+          - dps_val: "on"
+            value: "On"
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: memory
+            value: "Last State"
+  - entity: lock
+    name: Child Lock
+    category: config
+    icon: "mdi:hand-back-right-off"
+    dps:
+      - id: 41
+        type: boolean
+        name: lock
+  - entity: select
+    name: Light mode
+    category: config
+    icon: "mdi:lightbulb"
+    dps:
+      - id: 40
+        type: string
+        name: option
+        mapping:
+          - dps_val: relay
+            value: State
+          - dps_val: pos
+            value: Position
+          - dps_val: none
+            value: "Off"
+          - dps_val: "on"
+            value: "On"