BottlecapDave / HomeAssistant-OctopusEnergy

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

Octopus integration appears to be down, unknown rates (many users) #886

Closed springfall2008 closed 4 months ago

springfall2008 commented 4 months ago

Describe the bug

Rates are reported as unknown

Reproduction steps

I'm on Intelligent GO but other Flux users have the issue

Expected behaviour

It doesn't crash

Tariff Code

unclear, inteligent GO

Integration Version

latest

Home Assistant Version

latest

Fresh Install?

Not specified

Home Assistant Logs

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/electricity/init.py", line 51, in calculate_electricity_consumption_and_cost raise Exception(f"Failed to find rate for consumption between {consumption_from} and {consumption_to}") Exception: Failed to find rate for consumption between 2024-05-25 04:30:00+00:00 and 2024-05-25 05:00:00+00:00 2024-05-25 09:52:15.178 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/octopus_energy/electricity/init.py", line 49, in calculate_electricity_consumption_and_cost rate = next(r for r in rate_data if r["start"] == consumption_from and r["end"] == consumption_to) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 416, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/octopus_energy/electricity/current_accumulative_consumption.py", line 96, in _handle_coordinator_update consumption_and_cost = calculate_electricity_consumption_and_cost( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/electricity/init.py", line 51, in calculate_electricity_consumption_and_cost raise Exception(f"Failed to find rate for consumption between {consumption_from} and {consumption_to}") Exception: Failed to find rate for consumption between 2024-05-25 04:30:00+00:00 and 2024-05-25 05:00:00+00:00

image

Confirmation

springfall2008 commented 4 months ago

I just noticed there is an update but I need to update HA first, will try that now

springfall2008 commented 4 months ago

Same issue I'm afraid:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 414, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/octopus_energy/electricity/current_accumulative_consumption.py", line 121, in _handle_coordinator_update consumption_and_cost = calculate_electricity_consumption_and_cost( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/electricity/init.py", line 67, in calculate_electricity_consumption_and_cost raise Exception(f"Failed to find rate for consumption between {consumption_from} and {consumption_to}") Exception: Failed to find rate for consumption between 2024-05-25 04:30:00+00:00 and 2024-05-25 05:00:00+00:00 2024-05-25 10:05:44.726 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/octopus_energy/electricity/init.py", line 65, in calculate_electricity_consumption_and_cost rate = next(r for r in rate_data if r["start"] == consumption_from and r["end"] == consumption_to) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 414, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/octopus_energy/electricity/current_accumulative_consumption.py", line 121, in _handle_coordinator_update consumption_and_cost = calculate_electricity_consumption_and_cost( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/electricity/init.py", line 67, in calculate_electricity_consumption_and_cost raise Exception(f"Failed to find rate for consumption between {consumption_from} and {consumption_to}") Exception: Failed to find rate for consumption between 2024-05-25 04:30:00+00:00 and 2024-05-25 05:00:00+00:00

SJB1235 commented 4 months ago

You might find it is an Octopus fault as it does not show tariff rates on their website under your account. eg: image

springfall2008 commented 4 months ago

I'm on Intelligent GO, but maybe the same issue

jwt99412 commented 4 months ago

It has started updating again for me. Rates are also now available in the octopus app

BottlecapDave commented 4 months ago

Hello. This looks like rate information is not being retrieved from OE. Based on other reports, it appears to be an error on the OE end, so very little I can do. Once the rate information becomes available, it should rectify itself.

springfall2008 commented 4 months ago

You are right Dave, it's back now.

Was the exception I had desired behaviour in this case?

BottlecapDave commented 4 months ago

Desired is a strong word ;) But it's expected as it needs the rate information to generate the cost. The same calculation code is shared between consumption and cost which is why you're seeing it in this sensor. As it looks like OE has fixed the issue on their end, I'll close this ticket.