Don't repeat getting receiver name on each update / pushed to denonavr 0.5.5 (#10915)

This commit is contained in:
Oliver 2017-12-03 21:51:32 +01:00 committed by Pascal Vizeli
parent 9577525b0b
commit 3a246df544
2 changed files with 7 additions and 8 deletions

View File

@ -20,7 +20,7 @@ from homeassistant.const import (
CONF_NAME, STATE_ON, CONF_ZONE, CONF_TIMEOUT) CONF_NAME, STATE_ON, CONF_ZONE, CONF_TIMEOUT)
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['denonavr==0.5.4'] REQUIREMENTS = ['denonavr==0.5.5']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -102,12 +102,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
if config.get(CONF_HOST) is None and discovery_info is None: if config.get(CONF_HOST) is None and discovery_info is None:
d_receivers = denonavr.discover() d_receivers = denonavr.discover()
# More than one receiver could be discovered by that method # More than one receiver could be discovered by that method
if d_receivers is not None: for d_receiver in d_receivers:
for d_receiver in d_receivers: host = d_receiver["host"]
host = d_receiver["host"] name = d_receiver["friendlyName"]
name = d_receiver["friendlyName"] new_hosts.append(
new_hosts.append( NewHost(host=host, name=name))
NewHost(host=host, name=name))
for entry in new_hosts: for entry in new_hosts:
# Check if host not in cache, append it and save for later # Check if host not in cache, append it and save for later

View File

@ -200,7 +200,7 @@ defusedxml==0.5.0
deluge-client==1.0.5 deluge-client==1.0.5
# homeassistant.components.media_player.denonavr # homeassistant.components.media_player.denonavr
denonavr==0.5.4 denonavr==0.5.5
# homeassistant.components.media_player.directv # homeassistant.components.media_player.directv
directpy==0.2 directpy==0.2