BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
613 stars 61 forks source link

Saving Session state 'On' for 30 minutes instead of 60 #132

Closed MrNorm closed 1 year ago

MrNorm commented 1 year ago

Thank you for this great integration. I've really enjoyed having it connected to my HA instance.

I've recently started taking part in the saving sessions but I had an issue which I can't seem to figure out.

I signed up for a session on 23rd January between 17:00 and 18:00, which is reflected in the state

image

But the state of the entity only enters 'On' halfway through the session

image

Is there anything I'm doing wrong with this integration?

Thanks

BottlecapDave commented 1 year ago

This is very odd as the logic is very simple (loops through all joined sessions and checks if now fall between any). I've personally never seen it not come on for the entire session. How long before the session started did you join?

MrNorm commented 1 year ago

Very strange! I did it the morning of. How regularly does the integration refresh? I wonder if perhaps I had external factors for this (e.g. internet connectivity issues)

BottlecapDave commented 1 year ago

It updates the saving sessions every 30 minutes. I'm not sure how soon after you've opted in Octopus Energy set this value. I assume you didn't have any related errors in your logs?

BottlecapDave commented 1 year ago

Another thought was do you remember if you restarted your HA instance around 5pm? There was a bug reported where attributes were not being restored correctly which might have caused the issue?

MrNorm commented 1 year ago

Hmm OK it was on the day but several hours prior to the session starting.

I think you're on to something on the restarting point. I was tweaking the automations prior to the session starting so I suspect I restarted to refresh everything.

Happy to close as we've had a session since then without any issues and I suspect this was caused due to a restart