mirror of
https://github.com/home-assistant/core.git
synced 2026-08-03 20:24:55 +02:00
Improve regression test for shelly via_device linking (#177930)
This commit is contained in:
@@ -15,7 +15,7 @@ from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceRegistry
|
||||
from homeassistant.helpers.entity_registry import EntityRegistry
|
||||
|
||||
from . import force_uptime_value, init_integration, snapshot_device_entities
|
||||
from . import MOCK_MAC, force_uptime_value, init_integration, snapshot_device_entities
|
||||
|
||||
from tests.common import async_load_json_object_fixture
|
||||
|
||||
@@ -579,7 +579,7 @@ async def test_blu_trv_device_info(
|
||||
device_registry: DeviceRegistry,
|
||||
) -> None:
|
||||
"""Test BLU TRV device info."""
|
||||
await init_integration(hass, 3, model=MODEL_BLU_GATEWAY_G3)
|
||||
config_entry = await init_integration(hass, 3, model=MODEL_BLU_GATEWAY_G3)
|
||||
|
||||
entry = entity_registry.async_get("climate.trv_name")
|
||||
assert entry
|
||||
@@ -590,6 +590,12 @@ async def test_blu_trv_device_info(
|
||||
assert device_entry.model_id == "SBTR-001AEU"
|
||||
assert device_entry.sw_version == "v1.2.10"
|
||||
|
||||
gateway_device_entry = device_registry.async_get_device_by_identifier(
|
||||
(DOMAIN, MOCK_MAC), config_entry.entry_id
|
||||
)
|
||||
assert gateway_device_entry
|
||||
assert device_entry.via_device_id == gateway_device_entry.id
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"fixture",
|
||||
|
||||
Reference in New Issue
Block a user