Update config_entries_config_flow_handler.md

This commit is contained in:
Paulus Schoutsen 2019-06-12 14:13:28 -07:00 committed by GitHub
parent 7ee774329d
commit b7be22f1f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,13 +78,14 @@ If your integration is discoverable without requiring any authentication, you'll
"""Config flow for LIFX."""
from homeassistant.helpers import config_entry_flow
from homeassistant import config_entries
import aiolifx
from .const import DOMAIN
async def _async_has_devices(hass):
"""Return if there are devices that can be discovered."""
import aiolifx
lifx_ip_addresses = await aiolifx.LifxScan(hass.loop).scan()
return len(lifx_ip_addresses) > 0