BottlecapDave / HomeAssistant-OctopusEnergy

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

Unable to get smart meter data #773

Closed pacemaker82 closed 4 months ago

pacemaker82 commented 4 months ago

Describe the bug

Unsure if this is just Octopus API availability issue or something else changed, but I am no longer receiving updates on import kWh, and therefore updates on any pricing related to that. I should note that I havent changed any config or updates with HA, it just started happening.

I get the following error in the logs:

Logger: homeassistant Source: custom_components/octopus_energy/utils/rate_information.py:60 Integration: Octopus Energy (documentation, issues) First occurred: 3:40:59 PM (49 occurrences) Last logged: 4:29:19 PM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners update_callback() File "/config/custom_components/octopus_energy/electricity/current_rate.py", line 104, in _handle_coordinator_update rate_information = get_current_rate_information(rates_result.rates, current) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/utils/rate_information.py", line 60, in get_current_rate_information "tariff_code": current_rate["tariff_code"],


KeyError: 'tariff_code'

### Reproduction steps

Check import usage for smart meter 

### Expected behaviour

Updates retrieved every 5 minutes

### Tariff Code

E-1R-INTELLI-BB-VAR-23-03-01-J

### Integration Version

10.1.2

### Home Assistant Version

2024.2.2

### Fresh Install?

Fresh install

### Home Assistant Logs

see above

### Confirmation

- [X] I confirm that I cannot find my solution within the [documentation](https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy)
- [X] I confirm that I cannot find my solution within the [FAQ](https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/faq)
pacemaker82 commented 4 months ago

no sooner did I post this, but it started to work again, so assuming this would be an issue with the Octopus API ? Is there an entity or attribute that might point to issues with their API a little easier (like if its 404ing or something)?

BottlecapDave commented 4 months ago

Please update to 10.1.3 (just released), as there was an issue with the sensor during a planned intelligent dispatch

pacemaker82 commented 4 months ago

thanks will do - not sure when HA will show it (nor how to force it) so will wait till it pops up