Verify that we register blueprints on automation setup (#43434)

This commit is contained in:
Paulus Schoutsen 2020-11-20 15:57:57 +01:00 committed by GitHub
parent bbb82ded68
commit dc5f7aedd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -163,6 +163,9 @@ async def async_setup(hass, config):
"""Set up the automation."""
hass.data[DOMAIN] = component = EntityComponent(LOGGER, DOMAIN, hass)
# To register the automation blueprints
async_get_blueprints(hass)
await _async_process_config(hass, config, component)
async def trigger_service_handler(entity, service_call):

View File

@ -3,7 +3,6 @@ from pathlib import Path
import pytest
from homeassistant.components import automation
from homeassistant.setup import async_setup_component
from tests.async_mock import Mock, patch
@ -15,7 +14,7 @@ async def setup_bp(hass):
assert await async_setup_component(hass, "blueprint", {})
# Trigger registration of automation blueprints
automation.async_get_blueprints(hass)
await async_setup_component(hass, "automation", {})
async def test_list_blueprints(hass, hass_ws_client):