Skip to content

Commit

Permalink
Merge pull request #1366 from custom-components/fix_cleanup
Browse files Browse the repository at this point in the history
fix cleanup service
  • Loading branch information
Ernst79 authored Jun 11, 2024
2 parents a5a8e53 + c7198fd commit 4ef0d0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/ble_monitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4ef0d0f

Please sign in to comment.