BottlecapDave / HomeAssistant-OctopusEnergy

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

Integration not starting since recent update #464

Closed ChrisWarwick closed 1 year ago

ChrisWarwick commented 1 year ago

Describe the bug

Since upgrading to the current release 8.4.2 a few days ago, the Octopus integration shows "Failed to set up"

I'm running the following: Home Assistant 2023.8.4 Supervisor 2023.10.0 Operating System 10.5 Frontend 20230802.1 - latest

Home Assistant Core event log error shown below.

All versions of the integration have been running happily for about a year prior to this.

Reproduction steps

Upgraded to current 8.4.2 release

Expected behaviour

Integration should initialise

Tariff Code

Unavailable

Integration Version

8.4.2

Home Assistant Version

2023.8.4

Fresh Install?

After upgrading

Home Assistant Logs

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/octopus_energy/coordinators/electricity_rates.py:124
Integration: Octopus Energy (documentation, issues)
First occurred: October 9, 2023 at 6:37:00 AM (3 occurrences)
Last logged: 12:52:50 PM

Error setting up entry Octopus Energy for octopus_energy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/octopus_energy/__init__.py", line 81, in async_setup_entry
    await async_setup_dependencies(hass, config)
  File "/config/custom_components/octopus_energy/__init__.py", line 153, in async_setup_dependencies
    await async_setup_electricity_rates_coordinator(hass, mpan, serial_number, is_smart_meter, is_export_meter)
  File "/config/custom_components/octopus_energy/coordinators/electricity_rates.py", line 124, in async_setup_electricity_rates_coordinator
    hass.data[DOMAIN][coordinator_key] = DataUpdateCoordinator(
                                         ^^^^^^^^^^^^^^^^^^^^^^
TypeError: DataUpdateCoordinator.__init__() got an unexpected keyword argument 'always_update'
BottlecapDave commented 1 year ago

Hello and sorry that you received this error. This has been previously raised as part of https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/450

I am using a new feature, but forgot to check the minimum required version of Home Assistant. I'm afraid you will need to update to at least 2023.09 in order for the latest update to work. Otherwise you'll need to downgrade the version of this integration to v8.3.0.

I updated the offending releases with this indicated in the changelog, but I have since removed the broken releases.

ChrisWarwick commented 1 year ago

Thanks for the swift response :-) I was holding off upgrading to 2023.09 as that broke one of my other integrations when I tested it!!!

Thanks for a great integration BTW :-)