Skip to content

Commit f20443c

Browse files
authored
fix cleanup service
fix cleanup service
1 parent a5a8e53 commit f20443c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/ble_monitor/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ async def async_cleanup_entries_service(hass: HomeAssistant, service_data):
412412

413413
# Remove devices that don't belong to any entity
414414
for device_id in devices_to_be_removed:
415-
if len(ent_registry.async_entries_for_device(ent_registry, device_id)) == 0:
415+
if len(entity_registry.async_entries_for_device(ent_registry, device_id)) == 0:
416416
dev_registry.async_remove_device(device_id)
417417
_LOGGER.debug("device %s will be deleted", device_id)
418418

0 commit comments

Comments
 (0)