From 9591aa66ba07cc0e5f96580aa404e676600109c0 Mon Sep 17 00:00:00 2001 From: zewelor Date: Mon, 18 Mar 2019 20:51:42 +0100 Subject: [PATCH] Fixx yeelight flow action param for declared effects (#22159) --- homeassistant/components/yeelight/light.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index b4b540f729b..18a0bf750a1 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -161,14 +161,20 @@ def _cmd(func): def _parse_custom_effects(effects_config): + import yeelight + effects = {} for config in effects_config: params = config[CONF_FLOW_PARAMS] + action = yeelight.Flow.actions[params[ATTR_ACTION]] transitions = YeelightLight.transitions_config_parser( params[ATTR_TRANSITIONS]) - effects[config[CONF_NAME]] = \ - {ATTR_COUNT: params[ATTR_COUNT], ATTR_TRANSITIONS: transitions} + effects[config[CONF_NAME]] = { + ATTR_COUNT: params[ATTR_COUNT], + ATTR_ACTION: action, + ATTR_TRANSITIONS: transitions + } return effects