mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Avoid call to hass.helpers.store
in CategoryRegistry (#114485)
This commit is contained in:
parent
ef5f6829e7
commit
502231b7d2
@ -11,6 +11,7 @@ from homeassistant.core import HomeAssistant, callback
|
|||||||
from homeassistant.util.ulid import ulid_now
|
from homeassistant.util.ulid import ulid_now
|
||||||
|
|
||||||
from .registry import BaseRegistry
|
from .registry import BaseRegistry
|
||||||
|
from .storage import Store
|
||||||
from .typing import UNDEFINED, EventType, UndefinedType
|
from .typing import UNDEFINED, EventType, UndefinedType
|
||||||
|
|
||||||
DATA_REGISTRY = "category_registry"
|
DATA_REGISTRY = "category_registry"
|
||||||
@ -46,7 +47,8 @@ class CategoryRegistry(BaseRegistry):
|
|||||||
"""Initialize the category registry."""
|
"""Initialize the category registry."""
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self.categories: dict[str, dict[str, CategoryEntry]] = {}
|
self.categories: dict[str, dict[str, CategoryEntry]] = {}
|
||||||
self._store = hass.helpers.storage.Store(
|
self._store: Store[dict[str, dict[str, list[dict[str, str]]]]] = Store(
|
||||||
|
hass,
|
||||||
STORAGE_VERSION_MAJOR,
|
STORAGE_VERSION_MAJOR,
|
||||||
STORAGE_KEY,
|
STORAGE_KEY,
|
||||||
atomic_writes=True,
|
atomic_writes=True,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user