Skip to content

Commit 94bf9fc

Browse files
authored
Merge pull request #1554 from warmfire540/release
register static files with async_register_static_paths instead
2 parents f3763dd + 2725320 commit 94bf9fc

File tree

1 file changed

+9
-4
lines changed
  • custom_components/ui_lovelace_minimalist

1 file changed

+9
-4
lines changed

custom_components/ui_lovelace_minimalist/base.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
GitHubRatelimitException,
1919
)
2020
from homeassistant.components.frontend import add_extra_js_url, async_remove_panel
21+
from homeassistant.components.http import StaticPathConfig
2122
from homeassistant.components.lovelace import _register_panel
2223
from homeassistant.components.lovelace.dashboard import LovelaceYAML
2324
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
@@ -363,10 +364,14 @@ async def configure_plugins(self) -> bool:
363364
)
364365

365366
# Register
366-
self.hass.http.register_static_path(
367-
"/ui_lovelace_minimalist/cards",
368-
self.hass.config.path(f"{self.integration_dir}/cards"),
369-
True,
367+
await self.hass.http.async_register_static_paths(
368+
[
369+
StaticPathConfig(
370+
"/ui_lovelace_minimalist/cards",
371+
self.hass.config.path(f"{self.integration_dir}/cards"),
372+
True,
373+
)
374+
]
370375
)
371376

372377
except Exception as exception:

0 commit comments

Comments
 (0)