Handle OSError when forcibly turning off media_player.samsungtv (#10997)
This commit is contained in:
parent
f21da7cfdc
commit
3c1f8cd882
1 changed files with 4 additions and 1 deletions
|
@ -190,7 +190,10 @@ class SamsungTVDevice(MediaPlayerDevice):
|
|||
else:
|
||||
self.send_key('KEY_POWEROFF')
|
||||
# Force closing of remote session to provide instant UI feedback
|
||||
try:
|
||||
self.get_remote().close()
|
||||
except OSError:
|
||||
_LOGGER.debug("Could not establish connection.")
|
||||
|
||||
def volume_up(self):
|
||||
"""Volume up the media player."""
|
||||
|
|
Loading…
Add table
Reference in a new issue