From f20443c931d9805b35b410452eb0de0a54e18b1f Mon Sep 17 00:00:00 2001 From: Ernst Klamer Date: Tue, 11 Jun 2024 20:39:49 +0200 Subject: [PATCH 1/2] fix cleanup service fix cleanup service --- custom_components/ble_monitor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From c7198fdacd4c6c2837c2341dcd6542d15e338fff Mon Sep 17 00:00:00 2001 From: Ernst Klamer Date: Tue, 11 Jun 2024 20:45:02 +0200 Subject: [PATCH 2/2] Update requirements_test.txt --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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