From 194adcde9c27d6754d0dfa46c4473a29b01d9985 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Jan 2023 11:52:18 -1000 Subject: [PATCH] Drop ChainMap in translation cache (#85260) --- homeassistant/helpers/translation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/translation.py b/homeassistant/helpers/translation.py index 049a37e0086..fc41ba1d6f3 100644 --- a/homeassistant/helpers/translation.py +++ b/homeassistant/helpers/translation.py @@ -2,7 +2,6 @@ from __future__ import annotations import asyncio -from collections import ChainMap from collections.abc import Iterable, Mapping import logging from typing import Any @@ -311,4 +310,7 @@ async def async_get_translations( cache = hass.data[TRANSLATION_FLATTEN_CACHE] = _TranslationCache(hass) cached = await cache.async_fetch(language, category, components) - return dict(ChainMap(*cached)) + result = {} + for entry in cached: + result.update(entry) + return result