BottlecapDave / HomeAssistant-OctopusEnergy

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

Error messages after update to v3.0.0 #32

Closed 35aportal closed 2 years ago

35aportal commented 2 years ago

I updated my custom_components folder with the new v3.0.0 files (just did a simple overwrite of previous files) and the integration appears to be working OK, other than this error message...

Logger: homeassistant.components.sensor Source: custom_components/octopus_energy/sensor.py:107 Integration: Sensor (documentation, issues) First occurred: 11:31:45 (1 occurrences) Last logged: 11:31:45

Error while setting up octopus_energy platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/octopus_energy/sensor.py", line 91, in async_setup_entry await async_setup_default_sensors(hass, entry, async_add_entities) File "/config/custom_components/octopus_energy/sensor.py", line 107, in async_setup_default_sensors tariff_code = hass.data[DOMAIN][DATA_TARIFF_CODE] KeyError: 'TARIFF_CODE'

BottlecapDave commented 2 years ago

Hello, sorry you're having issues. I assume you have tried restarting your instance?

35aportal commented 2 years ago

Yes, after I dropped the files in the folder, I did a Server Restart.

BottlecapDave commented 2 years ago

I'm struggling to recreate it locally, but I believe v3.0.1 should fix the problem.

35aportal commented 2 years ago

I've made the update now don't see the error - consider it fixed! Thanks for the awesome service.

Merry Christmas & Happy New Year.

BottlecapDave commented 2 years ago

Glad to hear that it worked.

Merry christmas and happy new year to you too!