-
-
Notifications
You must be signed in to change notification settings - Fork 36.9k
Description
The problem
Govee light local only uses a single interface for discovery. In installations with multiple network interfaces, the integration will not attempt to discover any devices on the additional interfaces.
The code here gets the first adapter IP that is capable reaching a public IP.
core/homeassistant/components/govee_light_local/config_flow.py
Lines 29 to 41 in 1d1a6ee
| adapter = await network.async_get_source_ip(hass, network.PUBLIC_TARGET_IP) | |
| controller: GoveeController = GoveeController( | |
| loop=hass.loop, | |
| logger=_LOGGER, | |
| listening_address=adapter, | |
| broadcast_address=CONF_MULTICAST_ADDRESS_DEFAULT, | |
| broadcast_port=CONF_TARGET_PORT_DEFAULT, | |
| listening_port=CONF_LISTENING_PORT_DEFAULT, | |
| discovery_enabled=True, | |
| discovery_interval=1, | |
| update_enabled=False, | |
| ) |
Instead the integration should use the methods in the Network integration like async_get_adapters or async_get_ipv4_broadcast_addresses to get source IPs for all available and enabled network interfaces.
This may explain some of the problems in #115611 and help mitigate the need for #109993
What version of Home Assistant Core has the issue?
core-2024.8.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
govee_light_local
Link to integration documentation on our website
https://www.home-assistant.io/integrations/govee_light_local
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response