mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Handle OSError when forcibly turning off media_player.samsungtv (#10997)
This commit is contained in:
parent
f21da7cfdc
commit
3c1f8cd882
@ -190,7 +190,10 @@ class SamsungTVDevice(MediaPlayerDevice):
|
||||
else:
|
||||
self.send_key('KEY_POWEROFF')
|
||||
# Force closing of remote session to provide instant UI feedback
|
||||
self.get_remote().close()
|
||||
try:
|
||||
self.get_remote().close()
|
||||
except OSError:
|
||||
_LOGGER.debug("Could not establish connection.")
|
||||
|
||||
def volume_up(self):
|
||||
"""Volume up the media player."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user