From af83fa809a66509cebef65990fe8fd5770a17bff Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 19 Jan 2026 06:08:00 -0500 Subject: [PATCH] Add app panel (#157554) Co-authored-by: Petar Petrov --- homeassistant/components/hassio/__init__.py | 3 ++- tests/components/hassio/test_init.py | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index a1f30276d1f..860f938ef35 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -16,7 +16,7 @@ from aiohasupervisor.models import GreenOptions, YellowOptions # noqa: F401 import voluptuous as vol from homeassistant.auth.const import GROUP_ID_ADMIN -from homeassistant.components import panel_custom +from homeassistant.components import frontend, panel_custom from homeassistant.components.homeassistant import async_set_stop_handler from homeassistant.components.http import StaticPathConfig from homeassistant.config_entries import SOURCE_SYSTEM, ConfigEntry @@ -292,6 +292,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa: return False async_load_websocket_api(hass) + frontend.async_register_built_in_panel(hass, "app") host = os.environ["SUPERVISOR"] websession = async_get_clientsession(hass) diff --git a/tests/components/hassio/test_init.py b/tests/components/hassio/test_init.py index 8008d5ae5f4..44011c153d8 100644 --- a/tests/components/hassio/test_init.py +++ b/tests/components/hassio/test_init.py @@ -260,6 +260,27 @@ async def test_setup_api_panel( } +async def test_setup_app_panel(hass: HomeAssistant) -> None: + """Test app panel is registered.""" + with patch.dict(os.environ, MOCK_ENVIRON): + result = await async_setup_component(hass, "hassio", {}) + await hass.async_block_till_done() + assert result + + panels = hass.data[frontend.DATA_PANELS] + + assert panels.get("app").to_response() == { + "component_name": "app", + "icon": None, + "title": None, + "default_visible": True, + "config": None, + "url_path": "app", + "require_admin": False, + "config_panel_domain": None, + } + + async def test_setup_api_push_api_data( hass: HomeAssistant, aioclient_mock: AiohttpClientMocker,