diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 985108fb9f8..83aa8cb893d 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -35,6 +35,7 @@ from .helpers import ( recorder, restore_state, template, + translation, ) from .helpers.dispatcher import async_dispatcher_send from .helpers.typing import ConfigType @@ -291,6 +292,7 @@ async def async_load_base_functionality(hass: core.HomeAssistant) -> None: platform.uname().processor # pylint: disable=expression-not-assigned # Load the registries and cache the result of platform.uname().processor + translation.async_setup(hass) entity.async_setup(hass) template.async_setup(hass) await asyncio.gather( diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 63c24b0f9e9..86e3385a21b 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -80,6 +80,7 @@ from homeassistant.util.thread import ThreadWithException from . import area_registry, device_registry, entity_registry, location as loc_helper from .singleton import singleton +from .translation import async_translate_state from .typing import TemplateVarsType # mypy: allow-untyped-defs, no-check-untyped-defs @@ -894,6 +895,36 @@ class AllStates: return "