mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add config flow support to Geolocation (#25046)
This commit is contained in:
parent
c5239c6176
commit
195b034abc
@ -23,11 +23,22 @@ SCAN_INTERVAL = timedelta(seconds=60)
|
|||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
"""Set up the Geolocation component."""
|
"""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)
|
await component.async_setup(config)
|
||||||
return True
|
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):
|
class GeolocationEvent(Entity):
|
||||||
"""This represents an external event with an associated geolocation."""
|
"""This represents an external event with an associated geolocation."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user