homeassistant-basestation
homeassistant-basestation copied to clipboard
Update of switch.lhb_1 is taking over 10 seconds
Hi!
I'm getting the following error:
2023-03-05 12:18:24.954 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.lhb_1 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in connect
reply = await self._bus.call(
File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 371, in call
await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 744, in async_device_update
await task
File "/config/custom_components/basestation/switch.py", line 71, in async_update
async with BleakClient(self.get_ble_device()) as client:
File "/usr/local/lib/python3.10/site-packages/bleak/__init__.py", line 433, in __aenter__
await self.connect()
File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 250, in connect
connected = await super().connect(**kwargs)
File "/usr/local/lib/python3.10/site-packages/bleak/__init__.py", line 471, in connect
return await self._backend.connect(**kwargs)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 171, in connect
async with async_timeout.timeout(timeout):
File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
It very rarely works but for the most part it doesn't and the logs get full of the same error as above, over and over again.
I'm running homeassistant on docker (itself on a normal PC, not a Raspberry Pi).
Any tips on dealing with this or troubleshooting would be appreciated!