From 195b034abc626824a56ea649b08f1f2bb90b66fa Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Tue, 9 Jul 2019 16:50:16 -0600 Subject: [PATCH] Add config flow support to Geolocation (#25046) --- homeassistant/components/geo_location/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/geo_location/__init__.py b/homeassistant/components/geo_location/__init__.py index 75c99ecc74c..23792e32a2b 100644 --- a/homeassistant/components/geo_location/__init__.py +++ b/homeassistant/components/geo_location/__init__.py @@ -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."""