Add config flow support to Geolocation (#25046)
This commit is contained in:
parent
c5239c6176
commit
195b034abc
1 changed files with 12 additions and 1 deletions
|
@ -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."""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue