This commit is contained in:
Home Assistant Version Control
2026-09-28 14:45:59 +00:00
parent ae38d6b234
commit cd65be7a07
35 changed files with 5212 additions and 133 deletions
+8
View File
@@ -25,6 +25,7 @@ from .repairs import SpookRepairManager
from .run_history import async_setup_run_history
from .services import SpookServiceManager
from .setup_helpers import async_forward_setup_entry
from .statistics_sources import async_setup_abandoned_statistics_watching
from .timed_states import async_setup_timed_states
if TYPE_CHECKING:
@@ -94,6 +95,13 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await services.async_setup()
entry.async_on_unload(services.async_on_unload)
# Watching before anything can start a wait it has to observe. A repair
# can put a statistic on the clock the first time it looks, and on the
# reload path that happens below rather than at some later event, so a
# watcher registered afterwards would already have missed the beginning
# of what it is meant to be watching.
entry.async_on_unload(async_setup_abandoned_statistics_watching(hass))
# Who you gonna call? SpookRepairManager!
repairs = SpookRepairManager(hass)