1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Save restore_state store in worker thread

This commit is contained in:
Erik
2025-11-25 19:40:30 +01:00
parent 521a6784b4
commit 1bd9d8a7be

View File

@@ -119,7 +119,11 @@ class RestoreStateData:
"""Initialize the restore state data class."""
self.hass: HomeAssistant = hass
self.store = Store[list[dict[str, Any]]](
hass, STORAGE_VERSION, STORAGE_KEY, encoder=JSONEncoder
hass,
STORAGE_VERSION,
STORAGE_KEY,
encoder=JSONEncoder,
serialize_in_event_loop=False,
)
self.last_states: dict[str, StoredState] = {}
self.entities: dict[str, RestoreEntity] = {}