Skip to content

Commit

Permalink
Follow changes to netdisco, separating DLNA into DLNA_DMS and DLNA_DMR (
Browse files Browse the repository at this point in the history
home-assistant#15877)

* Follow changes to netdisco, separating DLNA into DLNA_DMS and DLNA_DMR

* No uppercase for names of netdisco discoverables
  • Loading branch information
StevenLooman authored and Jacob Mansfield committed Sep 4, 2018
1 parent 21772c6 commit 8cca2b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
'volumio': ('media_player', 'volumio'),
'nanoleaf_aurora': ('light', 'nanoleaf_aurora'),
'freebox': ('device_tracker', 'freebox'),
'DLNA': ('media_player', 'dlna_dmr')
'dlna_dmr': ('media_player', 'dlna_dmr'),
}

OPTIONAL_SERVICE_HANDLERS = {
Expand Down
14 changes: 0 additions & 14 deletions homeassistant/components/media_player/dlna_dmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@
'channel': 'video/*',
'playlist': 'playlist/*',
}
UPNP_DEVICE_MEDIA_RENDERER = [
'urn:schemas-upnp-org:device:MediaRenderer:1',
'urn:schemas-upnp-org:device:MediaRenderer:2',
'urn:schemas-upnp-org:device:MediaRenderer:3',
]

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -126,15 +121,6 @@ async def async_setup_platform(hass: HomeAssistant,
async_add_devices,
discovery_info=None):
"""Set up DLNA DMR platform."""
# ensure this is a DLNA DMR device, if found via discovery
if discovery_info and \
'upnp_device_type' in discovery_info and \
discovery_info['upnp_device_type'] not in UPNP_DEVICE_MEDIA_RENDERER:
_LOGGER.debug('Device is not a MediaRenderer: %s, device_type: %s',
discovery_info.get('ssdp_description'),
discovery_info['upnp_device_type'])
return

if config.get(CONF_URL) is not None:
url = config[CONF_URL]
name = config.get(CONF_NAME)
Expand Down

0 comments on commit 8cca2b4

Please sign in to comment.