mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Keep track of top level components (#115586)
* Keep track of top level components Currently we have to do a set comp for icons, translations, and integration platforms every time to split the top level components from the platforms. Keep track of the top level components in a seperate set so avoid having to do the setcomp every time. * remove impossible paths * remove unused code * preen * preen * fix * coverage and fixes * Update homeassistant/core.py * Update homeassistant/core.py * Update tests/test_core.py
This commit is contained in:
@@ -106,8 +106,8 @@ async def test_get_icons(hass: HomeAssistant) -> None:
|
||||
# Ensure icons file for platform isn't loaded, as that isn't supported
|
||||
icons = await icon.async_get_icons(hass, "entity")
|
||||
assert icons == {}
|
||||
icons = await icon.async_get_icons(hass, "entity", ["test.switch"])
|
||||
assert icons == {}
|
||||
with pytest.raises(ValueError, match="test.switch"):
|
||||
await icon.async_get_icons(hass, "entity", ["test.switch"])
|
||||
|
||||
# Load up an custom integration
|
||||
hass.config.components.add("test_package")
|
||||
|
||||
Reference in New Issue
Block a user