1 """The qnap component."""
3 from __future__
import annotations
9 from .const
import DOMAIN
10 from .coordinator
import QnapCoordinator
12 PLATFORMS: list[Platform] = [
18 """Set the config entry up."""
19 hass.data.setdefault(DOMAIN, {})
22 await coordinator.async_config_entry_first_refresh()
23 hass.data[DOMAIN][config_entry.entry_id] = coordinator
24 await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
29 """Unload a config entry."""
30 if unload_ok := await hass.config_entries.async_unload_platforms(
31 config_entry, PLATFORMS
33 hass.data[DOMAIN].pop(config_entry.entry_id)
bool async_unload_entry(HomeAssistant hass, ConfigEntry config_entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry config_entry)