From fc84e4061f8d723ef9df565cda355d1c6aff7e32 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 18 May 2022 11:59:13 +0200 Subject: [PATCH] Cleanup deprecated async_get_registry in philips_js (#72071) --- homeassistant/components/philips_js/device_trigger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/philips_js/device_trigger.py b/homeassistant/components/philips_js/device_trigger.py index 09784dae63f..a48f9e58331 100644 --- a/homeassistant/components/philips_js/device_trigger.py +++ b/homeassistant/components/philips_js/device_trigger.py @@ -12,7 +12,7 @@ from homeassistant.components.automation import ( from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA from homeassistant.const import CONF_DEVICE_ID, CONF_DOMAIN, CONF_PLATFORM, CONF_TYPE from homeassistant.core import CALLBACK_TYPE, HomeAssistant -from homeassistant.helpers.device_registry import DeviceRegistry, async_get_registry +from homeassistant.helpers import device_registry as dr from homeassistant.helpers.typing import ConfigType from . import PhilipsTVDataUpdateCoordinator @@ -53,7 +53,7 @@ async def async_attach_trigger( ) -> CALLBACK_TYPE | None: """Attach a trigger.""" trigger_data = automation_info["trigger_data"] - registry: DeviceRegistry = await async_get_registry(hass) + registry: dr.DeviceRegistry = dr.async_get(hass) if config[CONF_TYPE] == TRIGGER_TYPE_TURN_ON: variables = { "trigger": {