1 """The forked_daapd component."""
7 from .const
import DOMAIN, HASS_DATA_REMOVE_LISTENERS_KEY, HASS_DATA_UPDATER_KEY
9 PLATFORMS = [Platform.MEDIA_PLAYER]
13 """Set up forked-daapd from a config entry by forwarding to platform."""
14 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
19 """Remove forked-daapd component."""
20 status = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
21 if status
and hass.data.get(DOMAIN)
and hass.data[DOMAIN].
get(entry.entry_id):
22 if websocket_handler := hass.data[DOMAIN][entry.entry_id][
25 websocket_handler.cancel()
26 for remove_listener
in hass.data[DOMAIN][entry.entry_id][
27 HASS_DATA_REMOVE_LISTENERS_KEY
30 del hass.data[DOMAIN][entry.entry_id]
31 if not hass.data[DOMAIN]:
web.Response get(self, web.Request request, str config_key)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)