mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Add exception handling when turning on Onkyo receivers (#4813)
This commit is contained in:
parent
695f062e29
commit
2e2b764dbe
@ -89,7 +89,7 @@ class OnkyoDevice(MediaPlayerDevice):
|
||||
except (ValueError, OSError, AttributeError, AssertionError):
|
||||
if self._receiver.command_socket:
|
||||
self._receiver.command_socket = None
|
||||
_LOGGER.info('Reseting connection to %s.', self._name)
|
||||
_LOGGER.info('Resetting connection to %s.', self._name)
|
||||
else:
|
||||
_LOGGER.info('%s is disconnected. Attempting to reconnect.',
|
||||
self._name)
|
||||
@ -173,7 +173,7 @@ class OnkyoDevice(MediaPlayerDevice):
|
||||
|
||||
def turn_on(self):
|
||||
"""Turn the media player on."""
|
||||
self._receiver.power_on()
|
||||
self.command('system-power on')
|
||||
|
||||
def select_source(self, source):
|
||||
"""Set the input source."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user