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:
Paulus Schoutsen 2020-11-02 15:00:13 +01:00 committed by GitHub
parent a84dc14569
commit 0fb587727c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 2144 additions and 22 deletions

View file

@ -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