diff --git a/custom_components/bahmcloud_store/__init__.py b/custom_components/bahmcloud_store/__init__.py index 8f17fde..1e51e54 100644 --- a/custom_components/bahmcloud_store/__init__.py +++ b/custom_components/bahmcloud_store/__init__.py @@ -1,11 +1,15 @@ from __future__ import annotations import logging - from homeassistant.core import HomeAssistant from .core import BCSCore -from .views import StaticAssetsView, BCSApiView, BCSCustomRepoView, BCSReadmeView +from .views import ( + StaticAssetsView, + BCSApiView, + BCSCustomRepoView, + BCSReadmeView, +) _LOGGER = logging.getLogger(__name__) @@ -13,13 +17,14 @@ DOMAIN = "bahmcloud_store" async def async_setup(hass: HomeAssistant, config: dict) -> bool: - core = BCSCore(hass) + # Übergib config korrekt an den Core + core = BCSCore(hass, config) await core.async_setup() hass.data.setdefault(DOMAIN, {}) hass.data[DOMAIN]["core"] = core - # HTTP views + # Register HTTP views (wie in der stabilen Version) hass.http.register_view(StaticAssetsView()) hass.http.register_view(BCSApiView(core)) hass.http.register_view(BCSCustomRepoView(core))