core icon indicating copy to clipboard operation
core copied to clipboard

Tuya Power Sensor Latency

Open pwhitea opened this issue 1 year ago • 21 comments
trafficstars

The problem

I have noticed that the readings from a number of sensors that I use for power monitoring in the energy dashboard are inacurate since 2023.12.1 release. I am comparing the sensor value from the Tuya integration with the value in the Smart Life app and see there is a considerable refresh latency occurring. When I compare my energy dashboard prior to Dec 2023 to historic data in the Smart Life app there were slight variances (5-10%) but generally cumulative daily values were comparable, now my enegy dashbaord readings are C 10x lower than cumulative values in smart life. Initially I thought that I had a problem with Riemann Sum's but following investigation its the actual sensor values being provided by the Tuya integration.

If I compare real time between a HA sensor and Smart Life app there is a discrepancy for all smart plug devices I have (10 in total) at any point in time. Close comparison of the HA power sensor and smart life real time power reading shows that the only time the two are comparible is after the integration has been reloaded, they then remain comparible for C10 minutes before the latency appears again. It appears that the appliance attached to the smart plug (in this case a TV) varies its power consumption - smart life captures this but HA does not.

Sharing an example of this, both screenshots taken at the same time

IMG_7453

Screenshot 2024-04-20 100735

What version of Home Assistant Core has the issue?

2024.4.3

What was the last working version of Home Assistant Core?

2023.12.1

What type of installation are you running?

Home Assistant Container

Integration causing the issue

tuya

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

pwhitea avatar Apr 20 '24 09:04 pwhitea