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:
@@ -1,5 +1,4 @@
|
||||
"""BleBox climate entities tests."""
|
||||
|
||||
import logging
|
||||
from unittest.mock import AsyncMock, PropertyMock
|
||||
|
||||
@@ -28,6 +27,7 @@ from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
from homeassistant.helpers import device_registry as dr
|
||||
|
||||
from .conftest import async_setup_entity, mock_feature
|
||||
|
||||
@@ -79,7 +79,7 @@ async def test_init(saunabox, hass, config):
|
||||
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
device_registry = await hass.helpers.device_registry.async_get_registry()
|
||||
device_registry = dr.async_get(hass)
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
|
||||
assert device.name == "My sauna"
|
||||
|
||||
Reference in New Issue
Block a user