core: Govee lights local fail to initialize on reboot
The problem
When I reboot the machine which is running home assistant the Govee integration will always fail to initialize. When I restart the systemd unit home assistant manages to find the lights.
This inegration needs to handle more graceful errors if it detects no network when it just started.
What version of Home Assistant Core has the issue?
2025.1.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Govee lights local
Link to integration documentation on our website
https://www.home-assistant.io/integrations/govee_light_local
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
2025-01-30 02:10:42.115 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Govee light local for govee_light_local
Traceback (most recent call last):
File "/nix/store/29a6wlyr860xg3i9n3pzavrlggmyxzkr-python3-3.13.1/lib/python3.13/asyncio/selector_events.py", line 1266, in sendto
self._sock.sendto(data, addr)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/dinyyvyb77hw012ya5g7pj1v3sxpa53d-homeassistant-2025.1.4/lib/python3.13/site-packages/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/dinyyvyb77hw012ya5g7pj1v3sxpa53d-homeassistant-2025.1.4/lib/python3.13/site-packages/homeassistant/components/govee_light_local/__init__.py", line 36, in async_setup_entry
await coordinator.start()
File "/nix/store/dinyyvyb77hw012ya5g7pj1v3sxpa53d-homeassistant-2025.1.4/lib/python3.13/site-packages/homeassistant/components/govee_light_local/coordinator.py", line 52, in start
await self._controller.start()
File "/nix/store/sf0bbl9fb5wx2vc22x068z1hv5lpfndv-python3.13-govee-local-api-1.5.3/lib/python3.13/site-packages/govee_local_api/controller.py", line 105, in start
self.send_discovery_message()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/nix/store/sf0bbl9fb5wx2vc22x068z1hv5lpfndv-python3.13-govee-local-api-1.5.3/lib/python3.13/site-packages/govee_local_api/controller.py", line 187, in send_discovery_message
self._transport.sendto(
~~~~~~~~~~~~~~~~~~~~~~^
bytes(message), (self._broadcast_address, self._broadcast_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/nix/store/29a6wlyr860xg3i9n3pzavrlggmyxzkr-python3-3.13.1/lib/python3.13/asyncio/selector_events.py", line 1271, in sendto
self._protocol.error_received(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GoveeController' object has no attribute 'error_received'
Additional information
Systemd unit has network-online.target so network should be ready but it’s not.
[Unit]
After=network-online.target mysql.service postgresql.service
Wants=network-online.target
...
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 5
- Comments: 17 (3 by maintainers)
I can confirm, this issue. After each and every restart of HASS I have to start from scratch, remove existing entries and add them again.