carohauta / oma-helen-ha-integration

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

Wrong value when calculating SMART_GUARANTEE price #12

Open ylihemmo opened 1 year ago

ylihemmo commented 1 year ago

Does this implementation take into account that there might be few "zero" days when Helen is getting that info from another electric companies?

At least when comparing with what API return and what comes to HA these values are quite far apart. HA is showing much more negative effect than API.

This is what first came to mind since if counting 1-3 zero days you would get much greater negative effect.

carohauta commented 1 year ago

This was implemented before Helen offered the data via their API. I remember seeing the price impact in the Helen app in the summer so they indeed do have an API for it now.

The calculation is not accurate for the exact reason you mentioned. Also, Helen API might not sometimes return the hourly price for each wanted hour so that also affects the result.

It would be nice to support smart guarantee contracts properly but I do not have a smart guarantee contract anymore so I don't know how the API response for it looks like.

Would it be possible for you to provide the response json with the calculated price impact? Or feel free to make a pull request if you wish.

Thanks!