1 """The DLNA Digital Media Server integration.
3 A single config entry is used, with SSDP discovery for media servers. Each
4 server is wrapped in a DmsEntity, and the server's USN is used as the unique_id.
7 from __future__
import annotations
12 from .const
import CONF_SOURCE_ID, LOGGER
13 from .dms
import get_domain_data
14 from .util
import generate_source_id
18 """Set up DLNA DMS device from a config entry."""
19 LOGGER.debug(
"Setting up config entry: %s", entry.unique_id)
22 if CONF_SOURCE_ID
not in entry.data:
23 LOGGER.debug(
"Adding CONF_SOURCE_ID to entry %s", entry.data)
24 data =
dict(entry.data)
26 hass.config_entries.async_update_entry(entry, data=data)
33 """Unload a config entry."""
34 LOGGER.debug(
"Unloading config entry: %s", entry.unique_id)
DlnaDmrData get_domain_data(HomeAssistant hass)
str generate_source_id(HomeAssistant hass, str name)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)