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:
1 parent
f1b91b050c
commit
919f3243de
2 files changed
+14
-6
No files matched your search
@@ -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