mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Simplify cv._base_trigger_list_flatten (#125613)
This commit is contained in:
parent
e0a221ba1f
commit
ded34561b1
@ -1786,7 +1786,7 @@ def _base_trigger_list_flatten(triggers: list[Any]) -> list[Any]:
|
||||
"""Flatten trigger arrays containing 'triggers:' sublists into a single list of triggers."""
|
||||
flatlist = []
|
||||
for t in triggers:
|
||||
if CONF_TRIGGERS in t and len(t.keys()) == 1:
|
||||
if CONF_TRIGGERS in t and len(t) == 1:
|
||||
triggerlist = ensure_list(t[CONF_TRIGGERS])
|
||||
flatlist.extend(triggerlist)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user