home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.68k stars 30.8k forks source link

zha got and unexpected keyword argument enable_mains_startup_polling #127763

Closed keesj closed 1 month ago

keesj commented 1 month ago

The problem

I am runing home assistant (pip / venv) and upgraded to 2024.10.1 and I am getting the following error:

  File "/home/home/home/lib/python3.12/site-packages/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/home/home/lib/python3.12/site-packages/homeassistant/components/zha/__init__.py", line 124, in async_setup_entry
    zha_lib_data: ZHAData = create_zha_config(hass, ha_zha_data)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/home/home/lib/python3.12/site-packages/homeassistant/components/zha/helpers.py", line 1233, in create_zha_config
    device_options: DeviceOptions = DeviceOptions(
                                    ^^^^^^^^^^^^^^
TypeError: DeviceOptions.__init__() got an unexpected keyword argument 'enable_mains_startup_polling'
2024-10-06 22:46:36.543 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
2024-10-06 22:46:36.546 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.00 seconds

The code was introduced not so long ago

https://github.com/home-assistant/core/commit/e81a1f7acf621f929a85d919bb57753f969a7c43

What version of Home Assistant Core has the issue?

2024.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

zha

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

keesj commented 1 month ago

config.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

logger:
  default: info
  logs:
    homeassistant.core: info
    homeassistant.components.zha: info
    bellows.zigbee.application: debug
    bellows.ezsp: debug
    zigpy: error
    zigpy_deconz.zigbee.application: error
    zigpy_deconz.api: error
    zigpy_xbee.zigbee.application: error
    zigpy_xbee.api: error
    zigpy_zigate: error
    zigpy_znp: error
    zhaquirks: error

zha: 
  zigpy_config:
    ota:
     otau_directory: /home/home/ota
     ikea_provider: true
     ledvance_provider: true
keesj commented 1 month ago

It turns out a different problem was causing ha to not start properly (the pyspeex_noise module installation is/was missing )