Group loading of translations for integrations to reduce executor jobs at startup (#110674)

This commit is contained in:
J. Nick Koston 2024-02-17 21:08:55 -06:00 committed by GitHub
parent def6c5c21c
commit 16653ff5d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 73 additions and 98 deletions

View file

@ -1972,7 +1972,7 @@ async def test_state_translated(
},
)
await hass.async_block_till_done()
await translation._async_load_state_translations_to_cache(hass, "en", None)
await translation._async_get_translations_cache(hass).async_load("en", set())
hass.states.async_set("switch.without_translations", "on", attributes={})
hass.states.async_set("binary_sensor.without_device_class", "on", attributes={})