Skip to content

Commit

Permalink
Fix roku play/pause during standby (home-assistant#36096)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington authored and frenck committed May 26, 2020
1 parent 249c00d commit 3d921ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions homeassistant/components/roku/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,18 @@ async def async_turn_off(self) -> None:

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."""
Expand Down

0 comments on commit 3d921ce

Please sign in to comment.