BottlecapDave / HomeAssistant-OctopusEnergy

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

Unable to start after manual upgrade to 9.2.0 beta 2 - DataUpdateCoordinator.__init__() got an unexpected keyword argument 'always_update' #648

Closed dickon closed 11 months ago

dickon commented 11 months ago

Describe the bug

I was using 7.0.0 but wanted to automate joining savings sessions. HACS did not offer the update, so I moved the custom_components/octopus_energy directory out of way, downloaded 9.0.0 beta 2 from github, and copied it in place:

dickon@mouse:~/home-assistant/custom_components$ sudo cp -r /tmp/HomeAssistant-OctopusEnergy-9.2.0-beta2/custom_components/octopus_energy octopus_energy

However, on startup I see in the Octopus logs (with my account ID redacted):

2023-12-19 18:44:18.936 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry A-92XXXXXX for octopus_energy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/octopus_energy/__init__.py", line 83, in async_setup_entry
    await async_setup_dependencies(hass, config)
  File "/config/custom_components/octopus_energy/__init__.py", line 161, 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 138, in async_setup_electricity_rates_coordinator
    hass.data[DOMAIN][coordinator_key] = DataUpdateCoordinator(
                                         ^^^^^^^^^^^^^^^^^^^^^^
TypeError: DataUpdateCoordinator.__init__() got an unexpected keyword argument 'always_update'

... and I have Failed to setup in my integrations list.

Reproduction steps

Integration failed to start

Expected behaviour

Integration starts

Tariff Code

can't read it right now, I suppose

Integration Version

9.0.0 beta 2

Home Assistant Version

2023.6.1

Fresh Install?

After upgrading

Home Assistant Logs

2023-12-19 18:44:18.936 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry A-92XXXXXX for octopus_energy Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/octopus_energy/init.py", line 83, in async_setup_entry await async_setup_dependencies(hass, config) File "/config/custom_components/octopus_energy/init.py", line 161, 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 138, in async_setup_electricity_rates_coordinator hass.data[DOMAIN][coordinator_key] = DataUpdateCoordinator( ^^^^^^^^^^^^^^^^^^^^^^ TypeError: DataUpdateCoordinator.init() got an unexpected keyword argument 'always_update'

Confirmation

BottlecapDave commented 11 months ago

Hello. There is a minimum version for HA which is 2023.9.0 which is why you're getting this error. This is present in the HACS JSON file. Please either downgrade the integration or upgrade your home assistant instance.

dickon commented 11 months ago

Confirmed, works fine after HA upgrade. Thanks @BottlecapDave