ZHA Smart plugs shows wrong sensor data

I have 4 zha smartplugs that is acting a little strange - well 3 of them are.

To make it easy I have just named them 1,2,3,4.

Here is an overview of them:

I have underlined what I find strange.

1: Energy / Kwh is unavailble?

2: 982 Kwh is half of my yearly power consumption. Perhaps a little high when its only a dehumidifier that is plugged in…

3: 0,2V … I have tried to change the AC voltage multiplier to 1000 but no luck there …

4: Seems fine.

Heres a little info on the devices:

TS0121
by _TZ3000_8nkb7mof
Connected via Zigbee Coordinator
Zigbee info
IEEE: 60:a4:23:ff:fe:7f:f5:3c
Nwk: 0x82f9
Device Type: Router
LQI: 72
RSSI: Unknown
Last Seen: 2022-02-03T08:53:30
Power Source: Mains
Quirk: zhaquirks.tuya.ts0121_plug.TS0121B
TS0121
by _TZ3000_8nkb7mof
Connected via Zigbee Coordinator
Zigbee info
IEEE: 84:fd:27:ff:fe:39:e5:7d
Nwk: 0x6741
Device Type: Router
LQI: 65
RSSI: Unknown
Last Seen: 2022-02-03T08:53:30
Power Source: Mains
Quirk: zhaquirks.tuya.ts0121_plug.TS0121B
TS011F
by _TZ3000_cphmq0q7
Connected via Zigbee Coordinator
Zigbee info
IEEE: 84:71:27:ff:fe:8d:ae:0c
Nwk: 0x99b7
Device Type: Router
LQI: 109
RSSI: Unknown
Last Seen: 2022-02-03T08:54:16
Power Source: Mains
Quirk: zhaquirks.tuya.ts011f_plug.Plug
TS0121
by _TZ3000_g5xawfcq
Connected via Zigbee Coordinator
Zigbee info
IEEE: 60:a4:23:ff:fe:d2:f1:c9
Nwk: 0x99f8
Device Type: Router
LQI: 72
RSSI: Unknown
Last Seen: 2022-02-03T08:54:30
Power Source: Mains
Quirk: zhaquirks.tuya.ts0121_plug.Plug

You probably have to change multiplier and/or divider in respective quirk in “ZHA Device Handlers”, see:

https://github.com/zigpy/zha-device-handlers

However first search issues about “TS0121” or “TS011F” there for existing reports:

https://github.com/zigpy/zha-device-handlers/issues

FYI, for ex. both “TS0121” and “TS011F” is mentioned in zha-quirks 0.0.66 that was just released:

https://github.com/zigpy/zha-device-handlers/releases

The reason why quirks are needed is normally due to firmware reporting non-standard values, read:

https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling

PS: ZHA allow you to enable a custom quirks path ZHA config option for testing an overwriting quirk:

https://www.home-assistant.io/integrations/zha#configuration-variables

Hey @Hedda thanks for your answer - thats gold!

I’ve read some of the zha-device-handlers page but I cant seem to find any “getting started”

So… How do I get going with the source code in under releases?

I just tried to download the source code , extract it like so:

image

And then in my configuration.yaml:

zha:
  custom_quirks_path: config/zhaquirks/

But nothing happens with the smart plugs?

Hello, a few of us have been having this issue. I’m not sure the cause but a reboot seemed to fix it for two of us. I had to do this to several ZHA sensors since December. They all had similar symptoms and I saw a post about it last night (and a reboot helped that user too).

Hi @Sergeantpup , I just tried to reboot number 3 - nothing happened . Are you sure you meant reboot and not reconfigure/readd it in ZHA? .

I just tried to add a new smart plug:

TS011F
by _TZ3000_typdpbpg
Connected via Zigbee Coordinator
Zigbee info
IEEE: a4:c1:38:fa:e7:98:4b:6c
Nwk: 0xb149
Device Type: Router
LQI: 134
RSSI: Unknown
Last Seen: 2022-02-03T18:29:32
Power Source: Mains
Quirk: tuya.ts011f_plug.Plug

Its a ts011f like number 3 but funny enough this one shows the right voltage measurement .

I deleted number 3 and added it again . Now the voltage measurement is correct.
I still have the custom_quirks_path added in config so I dont know if that does anything or its the reconfig alone that helped.

Yep I meant reboot. Worked for two of us multiple times. Sorry it didn’t work for you. Was worth a shot.

If anyone know how to reset the energy/kwh counter please let me know .

I ended up removing all the smartplugs and readd them in ZHA. Now everything seems fine.