albaintor/homeassistant_electrolux_status

'NoneType' object is not iterable

Closed this issue · 3 comments

Updated to latest 2.0.4 and get this error now.

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 12:44:48 (2 occurrences)
Last logged: 12:47:15

Error setting up entry rusteff@gmail.com for electrolux_status
Traceback (most recent call last):
File "/config/custom_components/electrolux_status/coordinator.py", line 394, in setup_entities
appliance.setup(
File "/config/custom_components/electrolux_status/api.py", line 596, in setup
for capability in capabilities_names:
TypeError: 'NoneType' object is not iterable

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 405, in setup_entities
raise UpdateFailed from exception
homeassistant.helpers.update_coordinator.UpdateFailed

Ok nailed it, another regression to fix in the next release

@albaintor perhaps I'm missing something obvious - but why would we want to continue setup if no capability is returned ?

In v1 you had some code that guessed what was needed but that was stripped out in v2 as it caused entities to be created that don't exist

For instance I had this issue pop up during building (and couldn't find a way to force replicate it) but it created entities for a fridge that don't exist

To "build from catalog" I believe you called it - the entities need to be consistent to all devices, and the ones that are aren't that useful

I think the setup error should be remaining as the device is not returing data we expect it to?