1 """The V2C integration."""
3 from __future__
import annotations
5 from pytrydan
import Trydan
12 from .coordinator
import V2CUpdateCoordinator
14 PLATFORMS: list[Platform] = [
15 Platform.BINARY_SENSOR,
22 type V2CConfigEntry = ConfigEntry[V2CUpdateCoordinator]
26 """Set up V2C from a config entry."""
28 host = entry.data[CONF_HOST]
32 await coordinator.async_config_entry_first_refresh()
34 entry.runtime_data = coordinator
36 if coordinator.data.ID
and entry.unique_id != coordinator.data.ID:
37 hass.config_entries.async_update_entry(entry, unique_id=coordinator.data.ID)
39 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
45 """Unload a config entry."""
46 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, V2CConfigEntry entry)
httpx.AsyncClient get_async_client(HomeAssistant hass, bool verify_ssl=True)