timmo001 / ovoenergy

Get energy data from OVO's API.
https://timmo.dev
Apache License 2.0
30 stars 16 forks source link

"Unavailable" messages #8

Closed elyobelyob closed 3 years ago

elyobelyob commented 3 years ago

Hi,

Did an upgrade to 0.118.4 yesterday and today see "unavailable", but no logs in home-assitant.log

Status shows as red and "restored" under entities.

Just wondering if anyone else has seen this or a known issue.

Thanks.

Screenshot 2020-12-01 at 16 18 08
elyobelyob commented 3 years ago

Also, I have removed and reimplemented the OVO integration with no luck ...

elyobelyob commented 3 years ago

I've also tested with postman to access my account, and the basic auth works ... thanks

elyobelyob commented 3 years ago

OK, I discovered the issue using postman.

I'm not yet on a smart meter, so have been regularly inputting my manual reading to test my implementation. However, with the change of the month to the 1st December, the null results aren't handled. So, rather than get a zero response, I was getting unavailable. I presume that even with a smart meter, everyone will show unavailable until the first reading is sent.

So, would suggest perhaps handling it with a zero if null.

Although, that would mean anyone with only one service would show the other at zero, so perhaps not the ideal scenario.

Having both gas and electricity entities available wouldn't be an issue to me (even without gas service), but you may think this could confuse users. For me, the unavailable entities was more of an issue as it messed up my front end.

I presume that I am a minority case, but I imagine everyone will go to unavailable for the first 30 mins on the first of every month.

Here's the data I think was received (I didn't exactly note the 1st Dec reading, however by sending a month before I joined, I get this ... which I think is the same).

{ "electricity": null, "gas": null }

Thanks

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.