Cleanup deprecated async_get_registry in plex (#72077)
parent
df13fcd1a5
commit
64b0dd1e7a
|
@ -20,6 +20,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.const import STATE_IDLE, STATE_PAUSED, STATE_PLAYING
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.dispatcher import (
|
||||
async_dispatcher_connect,
|
||||
|
@ -27,7 +28,6 @@ from homeassistant.helpers.dispatcher import (
|
|||
)
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.entity_registry import async_get_registry
|
||||
from homeassistant.helpers.network import is_internal_request
|
||||
|
||||
from .const import (
|
||||
|
@ -76,7 +76,7 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up Plex media_player from a config entry."""
|
||||
server_id = config_entry.data[CONF_SERVER_IDENTIFIER]
|
||||
registry = await async_get_registry(hass)
|
||||
registry = er.async_get(hass)
|
||||
|
||||
@callback
|
||||
def async_new_media_players(new_entities):
|
||||
|
|
Loading…
Reference in New Issue