core: ZHA smart socket(s) show the wrong values

The problem

Hey ZHA Crew,

Been awhile but Thanks for implementing the Volt, Amperage, Total Power values in the smart socket.

Living in the Netherlands we use the , (comma) as the decimal separator and the . (point) as thousand separator. so a million would be 1.000.000,0

The default unit of measurement of the total power value is KW. Regarding the value (see attachment) 1.658,0 is a little high for us Dutchies by a factor of 1000. So I customized the unit of measurement to W instead of KW as you can see in the attachment.

Didn’t give the Amperage much thought till I saw a value of 313 A come by. Which is impossible given Ohms law (and the main Fuse) this must be 0,313 A or 313 mA. Of course I can customize this also and make it mA, but a power socket in mA ?!

Oh btw I didnt try this already in my energy setup, so I dont know how big an issue it is gonne be changing values here from KW to W as the main unit of measurement.

I use different brand sockets but the all use: Quirk: zhaquirks.tuya.ts0121_plug.Plug

Can you guys do something with above information?

Wall plug ZHA wrong values

Regards Frank

What version of Home Assistant Core has the issue?

core-2021.11.5

What was the last working version of Home Assistant Core?

none

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA Quirk: zhaquirks.tuya.ts0121_plug.Plug

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

nop

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31 (4 by maintainers)

Most upvoted comments

This is fixed in 2021.12. You will need to reconfigure the device.

grafik

If the ac_current_divisor cluster attribute has a value of 1000 the reconfiguration was successful and your device should show the correct values:

grafik

Note that these cheap plugs are not precise measuring devices 😉. If you do the math for my screenshot it doesn’t add up, but I think the average more or less fits…