1 """The Monzo integration."""
3 from __future__
import annotations
11 async_get_config_entry_implementation,
14 from .api
import AuthenticatedMonzoAPI
15 from .const
import DOMAIN
16 from .coordinator
import MonzoCoordinator
18 PLATFORMS: list[Platform] = [Platform.SENSOR]
22 """Set up Monzo from a config entry."""
31 await coordinator.async_config_entry_first_refresh()
33 hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
34 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
40 """Unload a config entry."""
41 unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
43 hass.data[DOMAIN].pop(entry.entry_id)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
aiohttp.ClientSession async_get_clientsession(HomeAssistant hass, bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT)
AbstractOAuth2Implementation async_get_config_entry_implementation(HomeAssistant hass, config_entries.ConfigEntry config_entry)