mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 02:21:40 +02:00
cover
This commit is contained in:
@@ -764,7 +764,7 @@ async def test_entity_assignment_to_sub_device(
|
||||
|
||||
# Check main device
|
||||
main_device = device_registry.async_get_device(
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, device.entry.unique_id)}
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, device.device_info.mac_address)}
|
||||
)
|
||||
assert main_device is not None
|
||||
|
||||
|
@@ -1597,19 +1597,19 @@ async def test_sub_device_cleanup(
|
||||
# Verify all sub devices exist
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_11111111")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_11111111")}
|
||||
)
|
||||
is not None
|
||||
)
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_22222222")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_22222222")}
|
||||
)
|
||||
is not None
|
||||
)
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_33333333")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_33333333")}
|
||||
)
|
||||
is not None
|
||||
)
|
||||
@@ -1636,19 +1636,19 @@ async def test_sub_device_cleanup(
|
||||
# Verify device 2 was removed
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_11111111")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_11111111")}
|
||||
)
|
||||
is not None
|
||||
)
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_22222222")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_22222222")}
|
||||
)
|
||||
is None
|
||||
) # Should be removed
|
||||
assert (
|
||||
device_registry.async_get_device(
|
||||
identifiers={(DOMAIN, f"{device.entry.unique_id}_33333333")}
|
||||
identifiers={(DOMAIN, f"{device.device_info.mac_address}_33333333")}
|
||||
)
|
||||
is not None
|
||||
)
|
||||
|
Reference in New Issue
Block a user