mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
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
@ -78,7 +78,9 @@ class DenonDevice(MediaPlayerDevice):
|
|||||||
|
|
||||||
def _setup_sources(self, telnet):
|
def _setup_sources(self, telnet):
|
||||||
# NSFRN - Network name
|
# 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
|
# SSFUN - Configured sources with names
|
||||||
self._source_list = {}
|
self._source_list = {}
|
||||||
@ -110,7 +112,7 @@ class DenonDevice(MediaPlayerDevice):
|
|||||||
|
|
||||||
if all_lines:
|
if all_lines:
|
||||||
return lines
|
return lines
|
||||||
return lines[0]
|
return lines[0] if lines else ''
|
||||||
|
|
||||||
def telnet_command(self, command):
|
def telnet_command(self, command):
|
||||||
"""Establish a telnet connection and sends `command`."""
|
"""Establish a telnet connection and sends `command`."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user