From 75c19fac24d694074c99f70ed86830d127369bb2 Mon Sep 17 00:00:00 2001 From: thekiwismarthome <134335563+thekiwismarthome@users.noreply.github.com> Date: Fri, 6 Feb 2026 00:31:08 +1300 Subject: [PATCH] Update frontend path registration for HA 2023 --- .../shopping_list_manager/__init__.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/custom_components/shopping_list_manager/__init__.py b/custom_components/shopping_list_manager/__init__.py index 6d93714..edf468c 100644 --- a/custom_components/shopping_list_manager/__init__.py +++ b/custom_components/shopping_list_manager/__init__.py @@ -16,12 +16,16 @@ _LOGGER = logging.getLogger(__name__) async def async_setup(hass: HomeAssistant, config: dict) -> bool: """Set up the Shopping List Manager component.""" - # Register frontend path for the card + # Register frontend path for the card (updated for HA 2023+) frontend_path = Path(__file__).parent / "frontend" - hass.http.register_static_path( - f"/hacsfiles/{DOMAIN}", - str(frontend_path), - cache_headers=False, + hass.http.async_register_static_paths( + [ + { + "url_path": f"/hacsfiles/{DOMAIN}", + "path": str(frontend_path), + "cache_headers": False, + } + ] ) _LOGGER.info(f"Registered frontend path: /hacsfiles/{DOMAIN}")