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

Add support for ZM-WiFi smart meter

Issue #1208
Jason Rumney 2 лет назад
Родитель
Сommit
f3c53ebb0b
3 измененных файлов с 84 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 82 0
      custom_components/tuya_local/devices/zm_wifi_smartmeter.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -413,3 +413,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [cart3a](https://github.com/cart3a) for contributing support for Beok TGM50 thermostats.
 - [cart3a](https://github.com/cart3a) for contributing support for Beok TGM50 thermostats.
 - [patoh](https://github.com/patoh) for contributing support for Breville Smart Dry Connect dehumidifiers.
 - [patoh](https://github.com/patoh) for contributing support for Breville Smart Dry Connect dehumidifiers.
 - [Cadish](https://github.com/Cadish) for assisting with support for Qlima D820A dehumidifiers.
 - [Cadish](https://github.com/Cadish) for assisting with support for Qlima D820A dehumidifiers.
+- [mellow8](https://github.com/mellow8) for assisting with support for ZM-Wi-Fi smart meters.

+ 1 - 0
DEVICES.md

@@ -283,6 +283,7 @@
 - V-WIFI-DL02-ES energy consumption clamp meter
 - V-WIFI-DL02-ES energy consumption clamp meter
 - WDYK 2P63A energy meter
 - WDYK 2P63A energy meter
 - WDYK 3 phase 4 pole 400V energy meter circuit breaker
 - WDYK 3 phase 4 pole 400V energy meter circuit breaker
+- ZM-Wi-Fi smart meter
 
 
 ### Battery Charger
 ### Battery Charger
 
 

+ 82 - 0
custom_components/tuya_local/devices/zm_wifi_smartmeter.yaml

@@ -0,0 +1,82 @@
+name: Energy meter
+products:
+  - id: nzexeqam9qulajbf
+    name: ZM-wi-Fi
+primary_entity:
+  entity: sensor
+  class: energy
+  dps:
+    - id: 1
+      type: integer
+      name: sensor
+      unit: kWh
+      class: total_increasing
+      mapping:
+        - scale: 100
+    - id: 10
+      name: fault_code
+      type: bitfield
+    - id: 17
+      name: alarm_setting
+      type: string
+    - id: 18
+      name: meter_id
+      type: string
+secondary_entities:
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        class: measurement
+        mapping:
+          - mask: "FFFF000000000000"
+            scale: 10
+  - entity: sensor
+    class: current
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: A
+        class: measurement
+        mapping:
+          - mask: "0000FFFFFF000000"
+            scale: 1000
+  - entity: sensor
+    class: power
+    category: diagnostic
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: kW
+        class: measurement
+        mapping:
+          - mask: "0000000000FFFFFF"
+            scale: 1000
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 10
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: switch
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+