Skip to content

Commit

Permalink
Avoid call to hass.helpers.store in CategoryRegistry (#114485)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede committed Mar 30, 2024
1 parent ef5f682 commit 502231b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/helpers/category_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from homeassistant.util.ulid import ulid_now

from .registry import BaseRegistry
from .storage import Store
from .typing import UNDEFINED, EventType, UndefinedType

DATA_REGISTRY = "category_registry"
Expand Down Expand Up @@ -46,7 +47,8 @@ def __init__(self, hass: HomeAssistant) -> None:
"""Initialize the category registry."""
self.hass = hass
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_KEY,
atomic_writes=True,
Expand Down

0 comments on commit 502231b

Please sign in to comment.