add suport of device_tracker

This commit is contained in:
2019-10-27 12:06:49 +01:00
parent d027e858ce
commit a5309cf62f
4 changed files with 126 additions and 6 deletions

View File

@@ -69,15 +69,18 @@ async def async_setup_entry(hass, entry):
account.auth_token
)
entry["description_placeholders"] = {
"auth_token": account.auth_token or "null"
}
hass.data[DOMAIN]["context"] = context
hass.async_create_task(hass.config_entries.async_forward_entry_setup(entry, "device_tracker"))
return True
async def async_unload_entry(hass, entry):
"""Unload an Georide config entry."""
await hass.config_entries.async_forward_entry_unload(entry, "device_tracker")
hass.data[DOMAIN]["unsub"]()
return True
class GeorideContext:
"""Hold the current Georide context."""