From 494d334e9e5019748386333a797578f24c6a02a4 Mon Sep 17 00:00:00 2001 From: Ovidiu Nitan Date: Sun, 20 Nov 2022 12:46:28 +0200 Subject: [PATCH] Allow calling localtuya.set_dp service by non-admin users --- custom_components/localtuya/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localtuya/__init__.py b/custom_components/localtuya/__init__.py index 9a996c3..b21bea0 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 )