BottlecapDave / HomeAssistant-OctopusEnergy

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

Gas Current Rate fails then restores state unavailable #86

Closed cspiby closed 1 year ago

cspiby commented 1 year ago

I've noticed this happening a few times, I assume the integration fails to retrieve the gas unit rate then just doesn't retry, reloading the integration just reloads the previous state as seen here

2022-11-04 11:23:44.806 INFO (MainThread) [custom_components.octopus_energy.sensor] Adding gas meter; mprn: 5034xxxxxx; serial number: E6S120xxxxxxxxx
2022-11-04 11:23:44.806 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Updating OctopusEnergyGasCurrentRate
2022-11-04 11:23:44.809 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 2.73
2022-11-04 11:23:44.809 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 0.310275
2022-11-04 11:23:44.809 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 0.293265
2022-11-04 11:23:44.810 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 0.58
2022-11-04 11:23:44.810 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 0.1461
2022-11-04 11:23:44.810 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 0.1387
2022-11-04 11:23:44.810 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 1.77
2022-11-04 11:23:45.006 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: unavailable
2022-11-04 11:23:45.028 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Finished fetching rates data in 0.221 seconds (success: True)
2022-11-04 11:23:44.810 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: 1.77
2022-11-04 11:23:45.006 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Restored state: unavailable
2022-11-04 11:23:45.028 DEBUG (MainThread) [custom_components.octopus_energy.sensor] Finished fetching rates data in 0.221 seconds (success: True)
github-actions[bot] commented 1 year ago

This issue has become stale because it has been open for 30 days with no activity. If you still think it's an issue, please respond soon.

BottlecapDave commented 1 year ago

Thanks for reporting this. I think I have found the issue and released a fix in https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/v4.7.1