Skip to content

Commit

Permalink
Add support for ZM-WiFi smart meter
Browse files Browse the repository at this point in the history
Issue #1208
  • Loading branch information
make-all committed Dec 3, 2023
1 parent 1adee59 commit f3c53eb
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- [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.
- [mellow8](https://github.com/mellow8) for assisting with support for ZM-Wi-Fi smart meters.
1 change: 1 addition & 0 deletions DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
- V-WIFI-DL02-ES energy consumption clamp meter
- WDYK 2P63A energy meter
- WDYK 3 phase 4 pole 400V energy meter circuit breaker
- ZM-Wi-Fi smart meter

### Battery Charger

Expand Down
82 changes: 82 additions & 0 deletions custom_components/tuya_local/devices/zm_wifi_smartmeter.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f3c53eb

Please sign in to comment.