diff --git a/custom_components/ble_monitor/__init__.py b/custom_components/ble_monitor/__init__.py index 9fd57787..34d8347c 100644 --- a/custom_components/ble_monitor/__init__.py +++ b/custom_components/ble_monitor/__init__.py @@ -412,7 +412,7 @@ async def async_cleanup_entries_service(hass: HomeAssistant, service_data): # Remove devices that don't belong to any entity for device_id in devices_to_be_removed: - if len(ent_registry.async_entries_for_device(ent_registry, device_id)) == 0: + if len(entity_registry.async_entries_for_device(ent_registry, device_id)) == 0: dev_registry.async_remove_device(device_id) _LOGGER.debug("device %s will be deleted", device_id) diff --git a/requirements_test.txt b/requirements_test.txt index dd30594a..ce4b33f0 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,4 +1,4 @@ -pytest-homeassistant-custom-component==0.13.119 +pytest-homeassistant-custom-component==0.13.133 # BLE montitor requirements pycryptodomex==3.19.1