mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix device_registry cleanup behavior (#35977)
* Fix: Only decives which are not referenced by an entity or a config_entry are removed * Adapted test for async_cleanup * Changed variable names
This commit is contained in:
@@ -539,7 +539,7 @@ async def test_cleanup_device_registry(hass, registry):
|
||||
device_registry.async_cleanup(hass, registry, ent_reg)
|
||||
|
||||
assert registry.async_get_device({("hue", "d1")}, set()) is not None
|
||||
assert registry.async_get_device({("hue", "d2")}, set()) is None
|
||||
assert registry.async_get_device({("hue", "d2")}, set()) is not None
|
||||
assert registry.async_get_device({("hue", "d3")}, set()) is not None
|
||||
assert registry.async_get_device({("something", "d4")}, set()) is None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user