mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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):
|
def _parse_custom_effects(effects_config):
|
||||||
|
import yeelight
|
||||||
|
|
||||||
effects = {}
|
effects = {}
|
||||||
for config in effects_config:
|
for config in effects_config:
|
||||||
params = config[CONF_FLOW_PARAMS]
|
params = config[CONF_FLOW_PARAMS]
|
||||||
|
action = yeelight.Flow.actions[params[ATTR_ACTION]]
|
||||||
transitions = YeelightLight.transitions_config_parser(
|
transitions = YeelightLight.transitions_config_parser(
|
||||||
params[ATTR_TRANSITIONS])
|
params[ATTR_TRANSITIONS])
|
||||||
|
|
||||||
effects[config[CONF_NAME]] = \
|
effects[config[CONF_NAME]] = {
|
||||||
{ATTR_COUNT: params[ATTR_COUNT], ATTR_TRANSITIONS: transitions}
|
ATTR_COUNT: params[ATTR_COUNT],
|
||||||
|
ATTR_ACTION: action,
|
||||||
|
ATTR_TRANSITIONS: transitions
|
||||||
|
}
|
||||||
|
|
||||||
return effects
|
return effects
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user