diff --git a/custom_components/browser_mod/mod_view.py b/custom_components/browser_mod/mod_view.py index d2186fd..309840f 100644 --- a/custom_components/browser_mod/mod_view.py +++ b/custom_components/browser_mod/mod_view.py @@ -1,4 +1,5 @@ from homeassistant.components.frontend import add_extra_js_url, async_register_built_in_panel +from homeassistant.components.http import StaticPathConfig from .const import FRONTEND_SCRIPT_URL, SETTINGS_PANEL_URL @@ -10,16 +11,26 @@ async def async_setup_view(hass): # Serve the Browser Mod controller and add it as extra_module_url - hass.http.register_static_path( - FRONTEND_SCRIPT_URL, - hass.config.path("custom_components/browser_mod/browser_mod.js"), + await hass.http.async_register_static_paths( + [ + StaticPathConfig( + FRONTEND_SCRIPT_URL, + hass.config.path("custom_components/browser_mod/browser_mod.js"), + True, + ) + ] ) add_extra_js_url(hass, FRONTEND_SCRIPT_URL) # Serve the Browser Mod Settings panel and register it as a panel - hass.http.register_static_path( - SETTINGS_PANEL_URL, - hass.config.path("custom_components/browser_mod/browser_mod_panel.js"), + await hass.http.async_register_static_paths( + [ + StaticPathConfig( + SETTINGS_PANEL_URL, + hass.config.path("custom_components/browser_mod/browser_mod_panel.js"), + True, + ) + ] ) async_register_built_in_panel( hass=hass,