From 77eab66e0f32a3466ded33f079a476033d105cc7 Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Mon, 25 May 2020 06:55:25 -0500 Subject: [PATCH] Fix roku play/pause during standby (#36096) --- homeassistant/components/roku/media_player.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/roku/media_player.py b/homeassistant/components/roku/media_player.py index 8c92eff3687..0deeb44dbc2 100644 --- a/homeassistant/components/roku/media_player.py +++ b/homeassistant/components/roku/media_player.py @@ -171,15 +171,18 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity): async def async_media_pause(self) -> None: """Send pause command.""" - await self.coordinator.roku.remote("play") + if self.state != STATE_STANDBY: + await self.coordinator.roku.remote("play") async def async_media_play(self) -> None: """Send play command.""" - await self.coordinator.roku.remote("play") + if self.state != STATE_STANDBY: + await self.coordinator.roku.remote("play") async def async_media_play_pause(self) -> None: """Send play/pause command.""" - await self.coordinator.roku.remote("play") + if self.state != STATE_STANDBY: + await self.coordinator.roku.remote("play") async def async_media_previous_track(self) -> None: """Send previous track command."""