Skip to content

sorted_addresses[prune_quota_shortfall][0] index out of range #534

@michaelw

Description

@michaelw

Configuration

Describe the bug

0.8.1 (HA Core 2025.4.2) appears to break after some time (~24h-ish) in my environment, did not observe this with 0.8.0rc1.

This error originated from a custom integration.

Logger: custom_components.bermuda
Source: helpers/update_coordinator.py:380
integration: Bermuda BLE Trilateration (documentation, issues)
First occurred: April 25, 2025 at 06:03:02 (2 occurrences)
Last logged: 07:57:15

Unexpected error fetching bermuda data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bermuda/coordinator.py", line 771, in _async_update_data
    self.prune_devices()
    ~~~~~~~~~~~~~~~~~~^^
  File "/config/custom_components/bermuda/coordinator.py", line 881, in prune_devices
    nowstamp - sorted_addresses[prune_quota_shortfall][0],
               ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

Diagnostics

Let me know which parts of the diagnostics are relevant for debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions