From 5643c2ba66cf98a84daf4ab10c92a8ed12d65b9f Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 3 Sep 2026 21:22:35 +0200 Subject: [PATCH] Rename service registration method in google_assistant and shopping_list (#181172) --- homeassistant/components/google_assistant/__init__.py | 4 ++-- homeassistant/components/google_assistant/services.py | 2 +- homeassistant/components/shopping_list/__init__.py | 4 ++-- homeassistant/components/shopping_list/services.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/google_assistant/__init__.py b/homeassistant/components/google_assistant/__init__.py index 3c87085929d2..e0ec33c7a0be 100644 --- a/homeassistant/components/google_assistant/__init__.py +++ b/homeassistant/components/google_assistant/__init__.py @@ -30,7 +30,7 @@ from .const import ( # noqa: F401 SOURCE_CLOUD, ) from .http import GoogleAssistantView, GoogleConfig -from .services import async_register_services +from .services import async_setup_services from .const import EVENT_COMMAND_RECEIVED, EVENT_SYNC_RECEIVED # noqa: F401, isort:skip @@ -102,7 +102,7 @@ async def async_setup(hass: HomeAssistant, yaml_config: ConfigType) -> bool: hass.data[DOMAIN][DATA_CONFIG] = yaml_config[DOMAIN] if CONF_SERVICE_ACCOUNT in yaml_config[DOMAIN]: - async_register_services(hass) + async_setup_services(hass) hass.async_create_task( hass.config_entries.flow.async_init( diff --git a/homeassistant/components/google_assistant/services.py b/homeassistant/components/google_assistant/services.py index 2c4391558e5d..1b30f7ef1d1f 100644 --- a/homeassistant/components/google_assistant/services.py +++ b/homeassistant/components/google_assistant/services.py @@ -13,7 +13,7 @@ _LOGGER = logging.getLogger(__name__) @callback -def async_register_services(hass: HomeAssistant) -> None: +def async_setup_services(hass: HomeAssistant) -> None: """Register Google Assistant services.""" async def request_sync_service_handler(call: ServiceCall) -> None: diff --git a/homeassistant/components/shopping_list/__init__.py b/homeassistant/components/shopping_list/__init__.py index 2d4bbf324b92..3af561798374 100644 --- a/homeassistant/components/shopping_list/__init__.py +++ b/homeassistant/components/shopping_list/__init__.py @@ -22,7 +22,7 @@ from .common import ( _get_shopping_data, ) from .const import DOMAIN -from .services import async_register_services +from .services import async_setup_services PLATFORMS = [Platform.TODO] @@ -33,7 +33,7 @@ CONFIG_SCHEMA = vol.Schema({DOMAIN: {}}, extra=vol.ALLOW_EXTRA) async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Initialize the shopping list.""" - async_register_services(hass) + async_setup_services(hass) if DOMAIN not in config: return True diff --git a/homeassistant/components/shopping_list/services.py b/homeassistant/components/shopping_list/services.py index 693c0d15b0be..5224bce10bdd 100644 --- a/homeassistant/components/shopping_list/services.py +++ b/homeassistant/components/shopping_list/services.py @@ -33,7 +33,7 @@ SERVICE_SORT_SCHEMA = vol.Schema( @callback -def async_register_services(hass: HomeAssistant) -> None: +def async_setup_services(hass: HomeAssistant) -> None: """Register shopping list services.""" async def add_item_service(call: ServiceCall) -> None: