Cleanup deprecated async_get_registry in philips_js (#72071)

pull/72086/head
epenet 2022-05-18 11:59:13 +02:00 committed by GitHub
parent 2060f42818
commit fc84e4061f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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": {