Skip to content

Commit

Permalink
Merge pull request #256 from johntdyer/master
Browse files Browse the repository at this point in the history
  • Loading branch information
vigonotion authored Sep 2, 2024
2 parents 47d2c0c + a4a85cf commit 34d2f86
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions custom_components/simpleicons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from homeassistant.components.frontend import _frontend_root
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.components.http import StaticPathConfig

from simpleicons.all import icons
import json
Expand Down Expand Up @@ -40,11 +41,12 @@ async def get(self, request):


async def async_setup(hass, config):
hass.http.register_static_path(
f"/{DOMAIN}/si.js",
hass.config.path(f"custom_components/{DOMAIN}/data/si.js"),
True,
)
await hass.http.async_register_static_paths([
StaticPathConfig("/simpleicons/si.js",
"/config/custom_components/simpleicons/data/si.js", True
)
])


hass.http.register_view(ListView())

Expand Down

0 comments on commit 34d2f86

Please sign in to comment.