1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Update tests a-b to use async_get() instead of async_get_registry() (#47651)

This commit is contained in:
Erik Montnemery
2021-03-09 14:24:34 +01:00
committed by GitHub
parent 3a054c3be7
commit 78b21b1ad1
40 changed files with 110 additions and 86 deletions

View File

@@ -13,6 +13,7 @@ from homeassistant.const import (
STATE_OFF,
STATE_ON,
)
from homeassistant.helpers import entity_registry as er
from .common import setup_platform
@@ -25,7 +26,7 @@ DEVICE_UID = "0012a4d3614cb7e2b8c9abea31d2fb2a"
async def test_entity_registry(hass):
"""Tests that the devices are registered in the entity registry."""
await setup_platform(hass, SWITCH_DOMAIN)
entity_registry = await hass.helpers.entity_registry.async_get_registry()
entity_registry = er.async_get(hass)
entry = entity_registry.async_get(AUTOMATION_ID)
assert entry.unique_id == AUTOMATION_UID