1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00
Files
core/homeassistant/components/smarttub/__init__.py
Matt Zimmerman 1817522107 Clean up SmartTub integration and tests (#165517)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2026-03-16 22:06:23 +01:00

34 lines
868 B
Python

"""SmartTub integration."""
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from .controller import SmartTubConfigEntry, SmartTubController
PLATFORMS = [
Platform.BINARY_SENSOR,
Platform.CLIMATE,
Platform.LIGHT,
Platform.SENSOR,
Platform.SWITCH,
]
async def async_setup_entry(hass: HomeAssistant, entry: SmartTubConfigEntry) -> bool:
"""Set up a smarttub config entry."""
controller = SmartTubController(hass)
await controller.async_setup_entry(entry)
entry.runtime_data = controller
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: SmartTubConfigEntry) -> bool:
"""Remove a smarttub config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)