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
72.81k stars 30.51k forks source link

iAqualink error adding entities for lights #66217

Closed LoLRick closed 2 years ago

LoLRick commented 2 years ago

The problem

Home Assistant throws an error during boot up when adding the pool and spa lights for my Jandy iAqualink system. Has been working fine for months and stopped working a few days ago.

What version of Home Assistant Core has the issue?

core_2022.2.5

What was the last working version of Home Assistant Core?

core_2021.12.10

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Jandy iAqualink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/iaqualink

Diagnostics information

Here is the error message and the trace back.

2022-02-09 12:14:24 ERROR (MainThread) [homeassistant.components.light] Error adding entities for domain light with platform iaqualink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 514, in _async_add_entity
capabilities=entity.capability_attributes,
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 835, in capability_attributes
data[ATTR_EFFECT_LIST] = self.effect_list
File "/usr/src/homeassistant/homeassistant/components/iaqualink/light.py", line 88, in effect_list
return list(self.dev.supported_light_effects)
File "/usr/local/lib/python3.9/site-packages/iaqualink/device.py", line 370, in supported_light_effects
return light_type_from_subtype(self.data["subtype"]).effects
File "/usr/local/lib/python3.9/site-packages/iaqualink/device.py", line 151, in light_type_from_subtype
return LIGHT_TYPES_BY_SUBTYPE_STR[subtype]
KeyError: '3'2022-02-09 12:14:24 ERROR (MainThread) [homeassistant.components.light] Error adding entities for domain light with platform iaqualink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 514, in _async_add_entity
capabilities=entity.capability_attributes,
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 835, in capability_attributes
data[ATTR_EFFECT_LIST] = self.effect_list
File "/usr/src/homeassistant/homeassistant/components/iaqualink/light.py", line 88, in effect_list
return list(self.dev.supported_light_effects)
File "/usr/local/lib/python3.9/site-packages/iaqualink/device.py", line 370, in supported_light_effects
return light_type_from_subtype(self.data["subtype"]).effects
File "/usr/local/lib/python3.9/site-packages/iaqualink/device.py", line 151, in light_type_from_subtype
return LIGHT_TYPES_BY_SUBTYPE_STR[subtype]
KeyError: '3'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

iaqualink documentation iaqualink source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @flz, mind taking a look at this issue as it has been labeled with an integration (iaqualink) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

LoLRick commented 2 years ago

With further experimentation I've found that this integration works if I set the light type to JandyColors in the iAqualink system. But setting it to Hayward Colorlogic, which is the light type I have, results in the error above.