JohNan / homeassistant-wellbeing

Get the status from your Electrolux devices connected to Wellbeing
MIT License
70 stars 17 forks source link

small error with the A5 integration #94

Open aheagel opened 1 month ago

aheagel commented 1 month ago

I just want to start out with that this plugin works perfectly as of now with my A5 air purifier.

Although even though this works perfect I still get an Error in my logs which is a bit annoying.

I suspect this is because of the Ionizer function which is available on all the other model listed, but not physically available for just the A5 models.

`Logger: homeassistant.components.switch Source: helpers/entity_platform.py:366 integration: Switch (documentation, issues) First occurred: 23:07:08 (2 occurrences) Last logged: 23:09:17

Error while setting up wellbeing platform for switch Traceback (most recent call last): File "/config/custom_components/wellbeing/switch.py", line 15, in async_setup_entry WellbeingSwitch(coordinator, entry, pnc_id, "Ionizer"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/wellbeing/switch.py", line 26, in init self._is_on = self.get_entity.state ^^^^^^^^^^^^^^^ File "/config/custom_components/wellbeing/entity.py", line 28, in get_entity return self.get_appliance.get_entity(self.entity_type, self.entity_attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/wellbeing/api.py", line 231, in get_entity return next( ^^^^^ StopIteration

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

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform await asyncio.shield(awaitable) RuntimeError: coroutine raised StopIteration`