diff --git a/homeassistant/components/fritz/__init__.py b/homeassistant/components/fritz/__init__.py index 9610fe4b34d..faf82b4b516 100644 --- a/homeassistant/components/fritz/__init__.py +++ b/homeassistant/components/fritz/__init__.py @@ -33,7 +33,7 @@ CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up fritzboxtools integration.""" - await async_setup_services(hass) + async_setup_services(hass) return True diff --git a/homeassistant/components/fritz/services.py b/homeassistant/components/fritz/services.py index 02e6c91f4bf..bba80eadf98 100644 --- a/homeassistant/components/fritz/services.py +++ b/homeassistant/components/fritz/services.py @@ -10,7 +10,7 @@ from fritzconnection.core.exceptions import ( from fritzconnection.lib.fritzwlan import DEFAULT_PASSWORD_LENGTH import voluptuous as vol -from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.exceptions import HomeAssistantError, ServiceValidationError from homeassistant.helpers.service import async_extract_config_entry_ids @@ -64,7 +64,8 @@ async def _async_set_guest_wifi_password(service_call: ServiceCall) -> None: ) from ex -async def async_setup_services(hass: HomeAssistant) -> None: +@callback +def async_setup_services(hass: HomeAssistant) -> None: """Set up services for Fritz integration.""" hass.services.async_register( diff --git a/homeassistant/components/homematicip_cloud/__init__.py b/homeassistant/components/homematicip_cloud/__init__.py index 9cf9ab28db7..30038d1f897 100644 --- a/homeassistant/components/homematicip_cloud/__init__.py +++ b/homeassistant/components/homematicip_cloud/__init__.py @@ -63,7 +63,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ) ) - await async_setup_services(hass) + async_setup_services(hass) return True diff --git a/homeassistant/components/homematicip_cloud/services.py b/homeassistant/components/homematicip_cloud/services.py index a0308b14d7e..1cfb3a55552 100644 --- a/homeassistant/components/homematicip_cloud/services.py +++ b/homeassistant/components/homematicip_cloud/services.py @@ -12,7 +12,7 @@ from homematicip.group import HeatingGroup import voluptuous as vol from homeassistant.const import ATTR_ENTITY_ID, ATTR_TEMPERATURE -from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.exceptions import ServiceValidationError from homeassistant.helpers import config_validation as cv from homeassistant.helpers.config_validation import comp_entity_ids @@ -120,7 +120,8 @@ SCHEMA_SET_HOME_COOLING_MODE = vol.Schema( ) -async def async_setup_services(hass: HomeAssistant) -> None: +@callback +def async_setup_services(hass: HomeAssistant) -> None: """Set up the HomematicIP Cloud services.""" @verify_domain_control(hass, DOMAIN) diff --git a/homeassistant/components/plex/__init__.py b/homeassistant/components/plex/__init__.py index eb57dc46727..bc117e4c7f4 100644 --- a/homeassistant/components/plex/__init__.py +++ b/homeassistant/components/plex/__init__.py @@ -105,7 +105,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ) hass.data.setdefault(DOMAIN, hass_data) - await async_setup_services(hass) + async_setup_services(hass) hass.http.register_view(PlexImageView()) diff --git a/homeassistant/components/plex/services.py b/homeassistant/components/plex/services.py index 6412a4c3927..1ff7820a2c0 100644 --- a/homeassistant/components/plex/services.py +++ b/homeassistant/components/plex/services.py @@ -7,7 +7,7 @@ from plexapi.exceptions import NotFound import voluptuous as vol from yarl import URL -from homeassistant.core import HomeAssistant, ServiceCall +from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.exceptions import HomeAssistantError from .const import DOMAIN, PLEX_URI_SCHEME, SERVERS, SERVICE_REFRESH_LIBRARY @@ -23,7 +23,8 @@ REFRESH_LIBRARY_SCHEMA = vol.Schema( _LOGGER = logging.getLogger(__package__) -async def async_setup_services(hass: HomeAssistant) -> None: +@callback +def async_setup_services(hass: HomeAssistant) -> None: """Set up services for the Plex component.""" async def async_refresh_library_service(service_call: ServiceCall) -> None: