1 """Config flow for Gree."""
3 from greeclimate.discovery
import Discovery
9 from .const
import DISCOVERY_TIMEOUT, DOMAIN
13 """Return if there are devices that can be discovered."""
14 gree_discovery = Discovery(DISCOVERY_TIMEOUT)
16 devices = await gree_discovery.scan(
17 wait_for=DISCOVERY_TIMEOUT, bcast_ifaces=bcast_addr
19 return len(devices) > 0
22 config_entry_flow.register_discovery_flow(DOMAIN,
"Gree Climate", _async_has_devices)
bool _async_has_devices(HomeAssistant hass)
set[IPv4Address] async_get_ipv4_broadcast_addresses(HomeAssistant hass)