diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index a72b842..78a9443 100644 --- a/custom_components/localtuya/__init__.py +++ b/custom_components/localtuya/__init__.py @@ -167,7 +167,7 @@ async def async_setup(hass: HomeAssistant, config: dict): _handle_reload, ) - hass.helpers.service.async_register_admin_service( + hass.services.async_register( DOMAIN, SERVICE_SET_DP, _handle_set_dp, schema=SERVICE_SET_DP_SCHEMA )