Skip to content

Commit

Permalink
Merge pull request #1554 from warmfire540/release
Browse files Browse the repository at this point in the history
register static files with async_register_static_paths instead
  • Loading branch information
wilbiev authored Dec 17, 2024
2 parents f3763dd + 2725320 commit 94bf9fc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions custom_components/ui_lovelace_minimalist/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
GitHubRatelimitException,
)
from homeassistant.components.frontend import add_extra_js_url, async_remove_panel
from homeassistant.components.http import StaticPathConfig
from homeassistant.components.lovelace import _register_panel
from homeassistant.components.lovelace.dashboard import LovelaceYAML
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
Expand Down Expand Up @@ -363,10 +364,14 @@ async def configure_plugins(self) -> bool:
)

# Register
self.hass.http.register_static_path(
"/ui_lovelace_minimalist/cards",
self.hass.config.path(f"{self.integration_dir}/cards"),
True,
await self.hass.http.async_register_static_paths(
[
StaticPathConfig(
"/ui_lovelace_minimalist/cards",
self.hass.config.path(f"{self.integration_dir}/cards"),
True,
)
]
)

except Exception as exception:
Expand Down

0 comments on commit 94bf9fc

Please sign in to comment.