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:
parent
fee1f2833d
commit
cb16465539
6 changed files with 83 additions and 45 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue