custom_components/bahmcloud_store/__init__.py aktualisiert
This commit is contained in:
@@ -4,7 +4,6 @@ import logging
|
|||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from .const import DOMAIN
|
|
||||||
from .core import BCSCore
|
from .core import BCSCore
|
||||||
from .views import (
|
from .views import (
|
||||||
StaticAssetsView,
|
StaticAssetsView,
|
||||||
@@ -16,6 +15,8 @@ from .views import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
DOMAIN = "bahmcloud_store"
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: dict) -> bool:
|
async def async_setup(hass: HomeAssistant, config: dict) -> bool:
|
||||||
core = BCSCore(hass)
|
core = BCSCore(hass)
|
||||||
@@ -31,7 +32,9 @@ async def async_setup(hass: HomeAssistant, config: dict) -> bool:
|
|||||||
hass.http.register_view(BCSReadmeView(core))
|
hass.http.register_view(BCSReadmeView(core))
|
||||||
hass.http.register_view(BCSRefreshView(core))
|
hass.http.register_view(BCSRefreshView(core))
|
||||||
|
|
||||||
# Panel registration stays in your existing file (unchanged) if you already have it elsewhere.
|
# IMPORTANT:
|
||||||
# If you register the panel here already, keep your current working code.
|
# Panel registration should remain as in your currently working version.
|
||||||
|
# If your panel registration is already inside BCSCore.async_setup(),
|
||||||
|
# do NOT duplicate it here to avoid double registration warnings.
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user