mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +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:
|
else:
|
||||||
self.send_key('KEY_POWEROFF')
|
self.send_key('KEY_POWEROFF')
|
||||||
# Force closing of remote session to provide instant UI feedback
|
# 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):
|
def volume_up(self):
|
||||||
"""Volume up the media player."""
|
"""Volume up the media player."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user