1 """The Devialet integration."""
3 from __future__
import annotations
5 from devialet
import DevialetApi
12 from .const
import DOMAIN
14 PLATFORMS = [Platform.MEDIA_PLAYER]
18 """Set up Devialet from a config entry."""
20 hass.data.setdefault(DOMAIN, {})[entry.entry_id] = DevialetApi(
21 entry.data[CONF_HOST], session
24 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
29 """Unload Devialet config entry."""
30 if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
31 del hass.data[DOMAIN][entry.entry_id]
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
bool async_unload_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)