This commit is contained in:
J. Nick Koston
2025-06-23 13:26:40 +02:00
parent 10de4caff3
commit 4f59317ab5
2 changed files with 7 additions and 7 deletions

View File

@@ -764,7 +764,7 @@ async def test_entity_assignment_to_sub_device(
# Check main device # Check main device
main_device = device_registry.async_get_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 assert main_device is not None

View File

@@ -1597,19 +1597,19 @@ async def test_sub_device_cleanup(
# Verify all sub devices exist # Verify all sub devices exist
assert ( assert (
device_registry.async_get_device( 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 is not None
) )
assert ( assert (
device_registry.async_get_device( 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 is not None
) )
assert ( assert (
device_registry.async_get_device( 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 is not None
) )
@@ -1636,19 +1636,19 @@ async def test_sub_device_cleanup(
# Verify device 2 was removed # Verify device 2 was removed
assert ( assert (
device_registry.async_get_device( 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 is not None
) )
assert ( assert (
device_registry.async_get_device( device_registry.async_get_device(
identifiers={(DOMAIN, f"{device.entry.unique_id}_22222222")} identifiers={(DOMAIN, f"{device.device_info.mac_address}_22222222")}
) )
is None is None
) # Should be removed ) # Should be removed
assert ( assert (
device_registry.async_get_device( 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 is not None
) )