Home Assistant Unofficial Reference 2024.12.1
__init__.py
Go to the documentation of this file.
1 """The Music Player Daemon integration."""
2 
3 from __future__ import annotations
4 
5 from homeassistant.config_entries import ConfigEntry
6 from homeassistant.const import Platform
7 from homeassistant.core import HomeAssistant
8 
9 PLATFORMS: list[Platform] = [Platform.MEDIA_PLAYER]
10 
11 
12 async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
13  """Set up Music Player Daemon from a config entry."""
14 
15  await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
16 
17  return True
18 
19 
20 async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
21  """Unload a config entry."""
22  return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
Definition: __init__.py:12
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
Definition: __init__.py:20