From db704b103344a7954971d85c85dd68a66ed4008d Mon Sep 17 00:00:00 2001 From: Artem Sorokin Date: Sat, 27 Apr 2024 17:11:20 +0300 Subject: [PATCH] Remove usage of deprecated hass.helpers --- custom_components/yandex_smart_home/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/yandex_smart_home/__init__.py b/custom_components/yandex_smart_home/__init__.py index d877e798..0279a75f 100644 --- a/custom_components/yandex_smart_home/__init__.py +++ b/custom_components/yandex_smart_home/__init__.py @@ -11,6 +11,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.entityfilter import BASE_FILTER_SCHEMA, FILTER_SCHEMA from homeassistant.helpers.reload import async_integration_yaml_config +from homeassistant.helpers.service import async_register_admin_service from homeassistant.helpers.typing import ConfigType import voluptuous as vol @@ -191,7 +192,7 @@ async def _handle_reload(*_): hass.data[DOMAIN][YAML_CONFIG] = config.get(DOMAIN) _update_config_entries(hass) - hass.helpers.service.async_register_admin_service(DOMAIN, SERVICE_RELOAD, _handle_reload) + async_register_admin_service(hass, DOMAIN, SERVICE_RELOAD, _handle_reload) _update_config_entries(hass)