Skip to content

Commit

Permalink
refactor: Import function instead of calling deprecated module.
Browse files Browse the repository at this point in the history
This change removes the deprecated call to `hass.helpers.service` to use
the recommended function import, so it works on 2026.1.
  • Loading branch information
estebanz01 committed Jan 23, 2025
1 parent 9da2406 commit d9a3e1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/localtuya/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.device_registry import DeviceEntry
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.service import async_register_admin_service

from .cloud_api import TuyaCloudApi
from .common import TuyaDevice, async_config_entry_by_device_id
Expand Down Expand Up @@ -162,7 +163,7 @@ async def _async_reconnect(now):

async_track_time_interval(hass, _async_reconnect, RECONNECT_INTERVAL)

hass.helpers.service.async_register_admin_service(
async_register_admin_service(
DOMAIN,
SERVICE_RELOAD,
_handle_reload,
Expand Down

0 comments on commit d9a3e1b

Please sign in to comment.