Add setup function to the component loader (#98148)

* Add setup function to the component loader

* Update test

* Setup the loader in safe mode and in check_config script
This commit is contained in:
Erik Montnemery 2023-08-15 10:59:42 +02:00 committed by GitHub
parent b1e5b3be34
commit 3b9d6f2dde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 48 deletions

View file

@ -1810,7 +1810,7 @@ async def test_execute_script_with_dynamically_validated_action(
ws_client = await hass_ws_client(hass)
module_cache = hass.data.setdefault(loader.DATA_COMPONENTS, {})
module_cache = hass.data[loader.DATA_COMPONENTS]
module = module_cache["fake_integration.device_action"]
module.async_call_action_from_config = AsyncMock()
module.async_validate_action_config = AsyncMock(