Home Assistant Unofficial Reference 2024.12.1
__init__.py
Go to the documentation of this file.
1 """The google_travel_time component."""
2 
3 from homeassistant.config_entries import ConfigEntry
4 from homeassistant.const import Platform
5 from homeassistant.core import HomeAssistant
6 
7 PLATFORMS = [Platform.SENSOR]
8 
9 
10 async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
11  """Set up Google Maps Travel Time from a config entry."""
12  await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
13  return True
14 
15 
16 async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
17  """Unload a config entry."""
18  return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
Definition: __init__.py:16
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
Definition: __init__.py:10