Skip to content

Commit

Permalink
Add config schema to satisfy hassfest requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD3y5eL committed Jan 18, 2025
1 parent dd5caa9 commit 1622d30
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_components/unifi_site_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from __future__ import annotations

import logging
from typing import Any

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_API_KEY, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .api import (
Expand All @@ -19,12 +19,16 @@
from .coordinator import UnifiSiteManagerDataUpdateCoordinator
from .services import async_setup_services, async_unload_services

_LOGGER = logging.getLogger(__name__)

PLATFORMS: list[Platform] = [
Platform.BINARY_SENSOR,
Platform.SENSOR,
]

_LOGGER = logging.getLogger(__name__)
# Add config schema to satisfy hassfest
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)


async def async_setup(hass: HomeAssistant, config: dict) -> bool:
"""Set up the UniFi Site Manager component."""
Expand All @@ -35,6 +39,7 @@ async def async_setup(hass: HomeAssistant, config: dict) -> bool:

return True


async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up UniFi Site Manager from a config entry."""
# Ensure domain data is initialized
Expand Down

0 comments on commit 1622d30

Please sign in to comment.