Hi everyone,
Currently trying to get a grasp of the power consumption from all my major devices, now that I’ve installed a frient energy meter on my energy meter.
For the bulk of this, I’ve been using cheap Tuya devices. Problem is, they’re reporting different data in the integration.
Specifically I’ve been using these Hihome mini Smart WiFi Plug with energy meter and these Nedis WiFi Smart Plug with Energy Monitoring | På lager | Billig
Both types have energy monitoring in the Tuya app, while the later also seems to have a Countdown feature. However, through the Tuya integration in Home Assistant, only the later creates power, current and voltage entities. The others only create a socket.
Looking into the Tuya IoT Platform, the reason for this seems quite obvious - they seem to have different values exposed:
Here’s the debug view for the ones that only create the socket entity:
And this is for the other ones, that create power, current and voltage as well:
Now, bare in mind, both do have consumption information through the Tuya app and if I look into the Device logs of the “socket only” group, the data is in fact there - for some reason it’s just not being exposed as a value Home Assistant can consume:
Looking at the device types may also be a hint, see here:
The ones with type “Power Monitor” are the ones who actually provide consumption data. The other ones do not, despite having the data.
So now the question is: How do I fix this? And can I even fix this? I don’t mind getting my hands dirty with some coding - I’m just not sure where to actually do this, because it seems to be a Tuya thing, rather than a strictly Home Assistant thing. Can I somehow debug exactly what Home Assistant receives from the API? Just to be sure it doesn’t actually get the consumption data, but just doesn’t know how to parse it?