1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-05 05:35:29 +01:00
Files
core/homeassistant/components/helty/__init__.py
T
Ermanno Baschiera bde3b6e59f Add filter reset button to Helty Flow (#172866)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:15:31 +02:00

27 lines
945 B
Python

"""The Helty Flow integration."""
from pyhelty import HeltyClient
from homeassistant.const import CONF_HOST, Platform
from homeassistant.core import HomeAssistant
from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator
PLATFORMS: list[Platform] = [Platform.BUTTON, Platform.FAN, Platform.SENSOR]
async def async_setup_entry(hass: HomeAssistant, entry: HeltyConfigEntry) -> bool:
"""Set up Helty Flow from a config entry."""
client = HeltyClient(entry.data[CONF_HOST])
coordinator = HeltyDataUpdateCoordinator(hass, entry, client)
await coordinator.async_config_entry_first_refresh()
entry.runtime_data = coordinator
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: HeltyConfigEntry) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)