agittins / bermuda

Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant
MIT License
575 stars 12 forks source link

Devices go unavailable every few mins for a few seconds #362

Open vaparr opened 4 hours ago

vaparr commented 4 hours ago

Logger: custom_components.bermuda Source: helpers/update_coordinator.py:382 integration: Bermuda BLE Trilateration (documentation, issues) First occurred: 1:21:26 AM (80 occurrences) Last logged: 1:31:25 AM

Unexpected error fetching bermuda data Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 382, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bermuda/coordinator.py", line 656, in _async_update_data device.calculate_data() File "/config/custom_components/bermuda/bermuda_device.py", line 190, in calculate_data scanner.calculate_data() File "/config/custom_components/bermuda/bermuda_device_scanner.py", line 382, in calculate_data self.hist_distance_by_interval.insert(0, self.hist_distance_by_interval[0])


IndexError: list index out of range

When this happens, i see this in the logbook:

My Phone BLE Bermuda Tracker was detected at unavailable
1:31:05 AM - 2 minutes ago
agittins commented 4 hours ago

Hey, thanks for your report. That definitely looks like a bug, I'll include a fix in the next version.

When this happens, does your phone stay unavailable or does it come back a second later? Sorry, answer to that is in the title of the bug report! 😅