From da9d71cb6b114b9afc6548034eb76060b55049d3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 20 Feb 2024 23:25:19 -0600 Subject: [PATCH] Fix race in automation test_extraction_functions (#111056) --- tests/components/automation/test_init.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/components/automation/test_init.py b/tests/components/automation/test_init.py index e75f41ad36b..462f748c15e 100644 --- a/tests/components/automation/test_init.py +++ b/tests/components/automation/test_init.py @@ -1623,6 +1623,9 @@ async def test_extraction_functions( await async_setup_component(hass, "homeassistant", {}) await async_setup_component(hass, "calendar", {"calendar": {"platform": "demo"}}) + # Ensure the calendar entities are setup before attaching triggers + await hass.async_block_till_done() + assert await async_setup_component( hass, DOMAIN,