mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Update tests p-s to use async_get() instead of async_get_registry() (#47654)
This commit is contained in:
@@ -20,6 +20,7 @@ from homeassistant.components.cover import (
|
||||
)
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID, STATE_UNAVAILABLE
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
||||
from .conftest import setup_platform
|
||||
@@ -31,8 +32,8 @@ async def test_entity_and_device_attributes(hass, device_factory):
|
||||
device = device_factory(
|
||||
"Garage", [Capability.garage_door_control], {Attribute.door: "open"}
|
||||
)
|
||||
entity_registry = await hass.helpers.entity_registry.async_get_registry()
|
||||
device_registry = await hass.helpers.device_registry.async_get_registry()
|
||||
entity_registry = er.async_get(hass)
|
||||
device_registry = dr.async_get(hass)
|
||||
# Act
|
||||
await setup_platform(hass, COVER_DOMAIN, devices=[device])
|
||||
# Assert
|
||||
|
||||
Reference in New Issue
Block a user