HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
229 stars 31 forks source link

Should use historical data entry for the sensor to improve reliability #389

Open mattinglis opened 5 months ago

mattinglis commented 5 months ago

Having used this integration for a few weeks, it's apparent that the API can't produce "live" data like a standard HA sensor does.

The code in sensor loops all catchup values and adds them together. This has the effect if the API is delayed, to just get splurges of data and not spread out through the day.

IMHO this sensor should use: https://github.com/ldotlopez/ha-historical-sensor

And populate historical values rather than live.

If I get a chance I will fork this and give it a bash but next to no free time for the coming weeks so placing here for reference.

timrwhite87 commented 5 months ago

Let us know if you do manage to fork it; i'd love to test this!

AN53808 commented 5 months ago

Likewise, I've only just enabled the Hildebrand Glow integration and I'm also getting groups of data in the wrong timeslot and wrong day sometimes. I have my electricity and gas meter set up (my electricity meter is dual tariff too) so plenty of opportunity to get inaccurate data. I'd be very interested if you manage to find time to fork it, happy to test also.