mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Fixx yeelight flow action param for declared effects (#22159)
This commit is contained in:
parent
af473cddf0
commit
9591aa66ba
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user