mirror of
https://github.com/home-assistant/core.git
synced 2025-05-02 05:07:52 +00:00
Handle service calls that do not refer entity IDs (#31317)
This commit is contained in:
parent
24f4f53f16
commit
d24e397a80
@ -201,6 +201,10 @@ class Script:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
entity_ids = data.get(ATTR_ENTITY_ID)
|
entity_ids = data.get(ATTR_ENTITY_ID)
|
||||||
|
|
||||||
|
if entity_ids is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if isinstance(entity_ids, str):
|
if isinstance(entity_ids, str):
|
||||||
entity_ids = [entity_ids]
|
entity_ids = [entity_ids]
|
||||||
|
|
||||||
|
@ -1043,6 +1043,7 @@ async def test_referenced_entities():
|
|||||||
"entity_id": "sensor.condition",
|
"entity_id": "sensor.condition",
|
||||||
"state": "100",
|
"state": "100",
|
||||||
},
|
},
|
||||||
|
{"service": "test.script", "data": {"without": "entity_id"}},
|
||||||
{"scene": "scene.hello"},
|
{"scene": "scene.hello"},
|
||||||
{"event": "test_event"},
|
{"event": "test_event"},
|
||||||
{"delay": "{{ delay_period }}"},
|
{"delay": "{{ delay_period }}"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user