BottlecapDave / HomeAssistant-OctopusEnergy

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

Saving session binary sensor toggles on and off when Home Assistant restarts #716

Closed gcoan closed 9 months ago

gcoan commented 10 months ago

Describe the bug

I upgraded to the 10.0.3 of the integration, restarted Home Assistant. Then upgraded HA to 2014.1.5 In both cases the binary_sensor.octopus_energy_a_XXXX_octoplus_saving_sessions fired off and then on, causing an automation to run when it shouldn't have done.

Looking back in my history it looks like the turning on and off is a bug in the newer version of the integration as these have only happened recently:

image

Since the start of the year I have upgraded HA 5 times from 2024.1.1 to 2024.1.5 and the Octopus integration to 10.0.0 to 10.0.2 and now 10.0.3

Reproduction steps

Restart Home Assistant

Expected behaviour

The saving session binary sensor should only change state at the start and end of a saving session

Tariff Code

E-1R-AGILE-FLEX-22-11-25-A

Integration Version

10.0.3

Home Assistant Version

2024.1.5

Fresh Install?

After upgrading

Home Assistant Logs

See screenshot above

Confirmation

mpartington commented 10 months ago

Can confirm I also see this on 10.0.3. It appears to turn on for a minute after a HA restart. 2 examples below:

Screenshot_2024-01-21-15-56-32-913_io homeassistant companion android~2

BottlecapDave commented 10 months ago

Hello. This looks like a side effect of no longer pulling in the latest information on startup and inconsistency with HA having state returned as True/False, but storing the restoration state as on/off. I'm away at the weekend, but will try and get a fix out by the end of next week.

ragg987 commented 10 months ago

I noticed the same issue but cannot say if it is upgrade related as I have only started to build my automations - see my discussion #719 . I've closed that discussion.

gcoan commented 10 months ago

Hello. This looks like a side effect of no longer pulling in the latest information on startup and inconsistency with HA having state returned as True/False, but storing the restoration state as on/off. I'm away at the weekend, but will try and get a fix out by the end of next week.

Thanks Dave.

BottlecapDave commented 9 months ago

This should now be fixed in v10.0.4

gcoan commented 9 months ago

Thanks for the fix, I'll monitor for it reoccurring On 29 Jan 2024 at 21:15 +0000, David Kendall @.***>, wrote:

This should now be fixed in v10.0.4 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

gcoan commented 9 months ago

Thanks @BottlecapDave I have installed the upgrade yesterday, just did a trial of restarting HA and the saving session binary sensor remained Off, it didn't toggle to Unknown or On.

perfect, thanks