albaintor / homeassistant_electrolux_status

Get the status from your Electrolux Care devices
MIT License
90 stars 22 forks source link

Update 2.0.6 Break Integration - Error setting up entry for electrolux_status integration - TypeError in electrolux_entity_factory #97

Closed cloudbr34k84 closed 3 weeks ago

cloudbr34k84 commented 3 weeks ago

Describe the issue Encountered an error when setting up the electrolux_status integration entry. The Home Assistant log shows a TypeError related to an unexpected keyword argument in the electrolux_entity_factory function.

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 18:55:02 (2 occurrences)
Last logged: 19:30:14

Error setting up entry 123243534654@gmail.com for electrolux_status
Traceback (most recent call last):
  File "/config/custom_components/electrolux_status/coordinator.py", line 402, in setup_entities
    appliance.setup(
  File "/config/custom_components/electrolux_status/api.py", line 618, in setup
    if (entity := self.get_entity(static_attribute)) is None:
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/electrolux_status/api.py", line 577, in get_entity
    return electrolux_entity_factory(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Appliance.get_entity.<locals>.electrolux_entity_factory() got an unexpected keyword argument 'entity_name'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/electrolux_status/__init__.py", line 71, in async_setup_entry
    await coordinator.setup_entities()
  File "/config/custom_components/electrolux_status/coordinator.py", line 413, in setup_entities
    raise UpdateFailed from exception
homeassistant.helpers.update_coordinator.UpdateFailed

Steps to Reproduce

  1. Configure the electrolux_status integration.
  2. Restart Home Assistant.
  3. Monitor logs for errors during setup.

Expected Behavior The electrolux_status integration should set up the entry without errors.

Actual Behavior An error occurs, preventing the setup from completing successfully.

Additional Context It appears the electrolux_entity_factory function in get_entity receives an unexpected entity_name keyword argument, leading to a TypeError. This causes an UpdateFailed exception in setup_entities.

aheinzig commented 3 weeks ago

Same here. Bildschirmfoto 2024-10-29 um 10 51 37

githubsharezone commented 3 weeks ago

same error

rjvbeek commented 3 weeks ago

Same here!

home-cloud commented 3 weeks ago

2.07 same error

albaintor commented 3 weeks ago

2.07 same error

It shouldn't, please send the HA logs in debug level. I don't have this problem on my instance

home-cloud commented 3 weeks ago

okay, reverse to 2.05 reboot -> working direct upgrade to 2.07 reboot -> working... don´t know why but it is working now ... thanks

albaintor commented 3 weeks ago

Ok no pb