mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix parsing yeelight custom effects, when not present in config (#20658)
This commit is contained in:
parent
25e1639050
commit
7429b9d87e
@ -193,8 +193,14 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
name = device_config[CONF_NAME]
|
||||
_LOGGER.debug("Adding configured %s", name)
|
||||
|
||||
custom_effects = _parse_custom_effects(config[CONF_CUSTOM_EFFECTS])
|
||||
device = {'name': name, 'ipaddr': ipaddr}
|
||||
|
||||
if CONF_CUSTOM_EFFECTS in config:
|
||||
custom_effects = \
|
||||
_parse_custom_effects(config[CONF_CUSTOM_EFFECTS])
|
||||
else:
|
||||
custom_effects = None
|
||||
|
||||
light = YeelightLight(device, device_config,
|
||||
custom_effects=custom_effects)
|
||||
lights.append(light)
|
||||
|
Loading…
x
Reference in New Issue
Block a user