Updated denon component to play nice with the 3808CI that doesn't support NSFRN command (#10157)
This commit is contained in:
parent
85d7377beb
commit
c0f8e6c5c5
1 changed files with 4 additions and 2 deletions
|
@ -78,7 +78,9 @@ class DenonDevice(MediaPlayerDevice):
|
|||
|
||||
def _setup_sources(self, telnet):
|
||||
# NSFRN - Network name
|
||||
self._name = self.telnet_request(telnet, 'NSFRN ?')[len('NSFRN '):]
|
||||
nsfrn = self.telnet_request(telnet, 'NSFRN ?')[len('NSFRN '):]
|
||||
if nsfrn:
|
||||
self._name = nsfrn
|
||||
|
||||
# SSFUN - Configured sources with names
|
||||
self._source_list = {}
|
||||
|
@ -110,7 +112,7 @@ class DenonDevice(MediaPlayerDevice):
|
|||
|
||||
if all_lines:
|
||||
return lines
|
||||
return lines[0]
|
||||
return lines[0] if lines else ''
|
||||
|
||||
def telnet_command(self, command):
|
||||
"""Establish a telnet connection and sends `command`."""
|
||||
|
|
Loading…
Add table
Reference in a new issue