Add config flow support to Geolocation (#25046)

This commit is contained in:
Aaron Bach 2019-07-09 16:50:16 -06:00 committed by Martin Hjelmare
parent c5239c6176
commit 195b034abc

View file

@ -23,11 +23,22 @@ SCAN_INTERVAL = timedelta(seconds=60)
async def async_setup(hass, config):
"""Set up the Geolocation component."""
component = EntityComponent(_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
component = hass.data[DOMAIN] = EntityComponent(
_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
await component.async_setup(config)
return True
async def async_setup_entry(hass, entry):
"""Set up a config entry."""
return await hass.data[DOMAIN].async_setup_entry(entry)
async def async_unload_entry(hass, entry):
"""Unload a config entry."""
return await hass.data[DOMAIN].async_unload_entry(entry)
class GeolocationEvent(Entity):
"""This represents an external event with an associated geolocation."""