diff --git a/homeassistant/components/amberelectric/__init__.py b/homeassistant/components/amberelectric/__init__.py index 06641327946..cd75079ef3b 100644 --- a/homeassistant/components/amberelectric/__init__.py +++ b/homeassistant/components/amberelectric/__init__.py @@ -9,14 +9,14 @@ from homeassistant.helpers import config_validation as cv from .const import CONF_SITE_ID, DOMAIN, PLATFORMS from .coordinator import AmberConfigEntry, AmberUpdateCoordinator -from .services import setup_services +from .services import async_setup_services CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the Amber component.""" - setup_services(hass) + async_setup_services(hass) return True diff --git a/homeassistant/components/amberelectric/services.py b/homeassistant/components/amberelectric/services.py index c22a04f2845..e1408444223 100644 --- a/homeassistant/components/amberelectric/services.py +++ b/homeassistant/components/amberelectric/services.py @@ -10,6 +10,7 @@ from homeassistant.core import ( ServiceCall, ServiceResponse, SupportsResponse, + callback, ) from homeassistant.exceptions import ServiceValidationError from homeassistant.helpers.selector import ConfigEntrySelector @@ -102,7 +103,8 @@ def get_forecasts(channel_type: str, data: dict) -> list[JsonValueType]: return results -def setup_services(hass: HomeAssistant) -> None: +@callback +def async_setup_services(hass: HomeAssistant) -> None: """Set up the services for the Amber integration.""" async def handle_get_forecasts(call: ServiceCall) -> ServiceResponse: