Add initial blueprint support (#42469)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
a84dc14569
commit
0fb587727c
30 changed files with 2144 additions and 22 deletions
|
@ -1232,3 +1232,25 @@ async def test_automation_variables(hass, caplog):
|
|||
hass.bus.async_fire("test_event_3", {"break": 0})
|
||||
await hass.async_block_till_done()
|
||||
assert len(calls) == 3
|
||||
|
||||
|
||||
async def test_blueprint_automation(hass, calls):
|
||||
"""Test blueprint automation."""
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
"automation",
|
||||
{
|
||||
"automation": {
|
||||
"use_blueprint": {
|
||||
"path": "test_event_service.yaml",
|
||||
"input": {
|
||||
"trigger_event": "blueprint_event",
|
||||
"service_to_call": "test.automation",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
hass.bus.async_fire("blueprint_event")
|
||||
await hass.async_block_till_done()
|
||||
assert len(calls) == 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue