mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix referenced entity extraction when service call entity contains a template (#41107)
This commit is contained in:
parent
00b3b9f183
commit
38d132addd
@ -850,7 +850,7 @@ class Script:
|
|||||||
|
|
||||||
entity_ids = data.get(ATTR_ENTITY_ID)
|
entity_ids = data.get(ATTR_ENTITY_ID)
|
||||||
|
|
||||||
if entity_ids is None:
|
if entity_ids is None or isinstance(entity_ids, template.Template):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(entity_ids, str):
|
if isinstance(entity_ids, str):
|
||||||
|
@ -1332,6 +1332,10 @@ async def test_referenced_entities(hass):
|
|||||||
"service": "test.script",
|
"service": "test.script",
|
||||||
"data": {"entity_id": ["light.service_list"]},
|
"data": {"entity_id": ["light.service_list"]},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"service": "test.script",
|
||||||
|
"data": {"entity_id": "{{ 'light.service_template' }}"},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"condition": "state",
|
"condition": "state",
|
||||||
"entity_id": "sensor.condition",
|
"entity_id": "sensor.condition",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user