1 """The Geocaching integration."""
8 async_get_config_entry_implementation,
11 from .const
import DOMAIN
12 from .coordinator
import GeocachingDataUpdateCoordinator
14 PLATFORMS = [Platform.SENSOR]
18 """Set up Geocaching from a config entry."""
23 hass, entry=entry, session=oauth_session
26 await coordinator.async_config_entry_first_refresh()
28 hass.data.setdefault(DOMAIN, {})
29 hass.data[DOMAIN][entry.entry_id] = coordinator
30 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
36 """Unload a config entry."""
37 if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
38 del hass.data[DOMAIN][entry.entry_id]
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
AbstractOAuth2Implementation async_get_config_entry_implementation(HomeAssistant hass, config_entries.ConfigEntry config_entry)