diff --git a/homeassistant/components/roku/media_player.py b/homeassistant/components/roku/media_player.py index 30cb4ec7a3e..d4a5f656c82 100644 --- a/homeassistant/components/roku/media_player.py +++ b/homeassistant/components/roku/media_player.py @@ -192,44 +192,52 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity): async def async_turn_on(self) -> None: """Turn on the Roku.""" await self.coordinator.roku.remote("poweron") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_turn_off(self) -> None: """Turn off the Roku.""" await self.coordinator.roku.remote("poweroff") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_media_pause(self) -> None: """Send pause command.""" if self.state not in (STATE_STANDBY, STATE_PAUSED): await self.coordinator.roku.remote("play") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_media_play(self) -> None: """Send play command.""" if self.state not in (STATE_STANDBY, STATE_PLAYING): await self.coordinator.roku.remote("play") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_media_play_pause(self) -> None: """Send play/pause command.""" if self.state != STATE_STANDBY: await self.coordinator.roku.remote("play") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_media_previous_track(self) -> None: """Send previous track command.""" await self.coordinator.roku.remote("reverse") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_media_next_track(self) -> None: """Send next track command.""" await self.coordinator.roku.remote("forward") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_mute_volume(self, mute) -> None: """Mute the volume.""" await self.coordinator.roku.remote("volume_mute") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_volume_up(self) -> None: @@ -253,6 +261,7 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity): return await self.coordinator.roku.tune(media_id) + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_select_source(self, source: str) -> None: @@ -271,3 +280,5 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity): if appl is not None: await self.coordinator.roku.launch(appl.app_id) + + await self.coordinator.async_request_refresh() diff --git a/homeassistant/components/roku/remote.py b/homeassistant/components/roku/remote.py index 5b893b6a0f8..3fcd2ee1a34 100644 --- a/homeassistant/components/roku/remote.py +++ b/homeassistant/components/roku/remote.py @@ -47,11 +47,13 @@ class RokuRemote(RokuEntity, RemoteEntity): async def async_turn_on(self, **kwargs) -> None: """Turn the device on.""" await self.coordinator.roku.remote("poweron") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_turn_off(self, **kwargs) -> None: """Turn the device off.""" await self.coordinator.roku.remote("poweroff") + await self.coordinator.async_request_refresh() @roku_exception_handler async def async_send_command(self, command: List, **kwargs) -> None: @@ -61,3 +63,5 @@ class RokuRemote(RokuEntity, RemoteEntity): for _ in range(num_repeats): for single_command in command: await self.coordinator.roku.remote(single_command) + + await self.coordinator.async_request_refresh()