From 584971e145eaf560fc20a268691064a4ea0b9658 Mon Sep 17 00:00:00 2001 From: Alone Date: Fri, 26 Apr 2024 17:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix=20for=20reload=20service=20(?= =?UTF-8?q?#1639)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/xiaomi_miot/__init__.py b/custom_components/xiaomi_miot/__init__.py index 62b93949b..6f3daded6 100644 --- a/custom_components/xiaomi_miot/__init__.py +++ b/custom_components/xiaomi_miot/__init__.py @@ -38,6 +38,7 @@ from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.reload import async_integration_yaml_config +from homeassistant.helpers.service import async_register_admin_service import homeassistant.helpers.device_registry as dr import homeassistant.helpers.config_validation as cv @@ -572,7 +573,8 @@ async def _handle_reload_config(service): ] await asyncio.gather(*reload_tasks) - hass.helpers.service.async_register_admin_service( + async_register_admin_service( + hass, DOMAIN, SERVICE_RELOAD, _handle_reload_config,