carohauta / oma-helen-ha-integration

Home Assistant integration for Oma Helen data
MIT License
37 stars 7 forks source link

PoC Helen hourly history #21

Open kaarlolahtela opened 8 months ago

kaarlolahtela commented 8 months ago

I created PoC of Helen hourly history data. This my first time write/modify Python, so if you can help make it pretty, or just make your own.

At least these few improvements I have in my mind

This is just an idea to get proper hourly history data, and not consumption on wrong day. The idea is from https://github.com/klausj1/homeassistant-statistics repository

Now this implementation loads hourly data from the beginning of the month.

kaarlolahtela commented 8 months ago

When comparing this to current implementation it has the same values, but in correct day. The sensor:helen_hourly_consumption2 is has 25.55 kWh on March 13 as has the original Helen Monthly Consumption on March 14, when it updates the latest values.

Screenshot from 2024-03-15 13-02-50_

Screenshot from 2024-03-15 13-03-04_

carohauta commented 7 months ago

Hi and thank you for your contribution!

This is an interesting idea and definitely a nice improvement. This is not something I was planning on implementing but since you already began the work I just might look into it.

If you are interested in developing it further by yourself, feel free! I can review the pull requests.

I changed the target branch to feature/historical-energy-stats in case there is a need for some bug fix development in dev branch.