Skip to content

Commit

Permalink
Switch play pause method in philips js (#85343)
Browse files Browse the repository at this point in the history
fixes undefined
  • Loading branch information
elupus authored and balloob committed Jan 9, 2023
1 parent cf06f3b commit 00e563f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/philips_js/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async def async_media_next_track(self) -> None:
async def async_media_play_pause(self) -> None:
"""Send pause command to media player."""
if self._tv.quirk_playpause_spacebar:
await self._tv.sendUnicode(" ")
await self._tv.sendKey("Confirm")
else:
await self._tv.sendKey("PlayPause")
await self._async_update_soon()
Expand Down Expand Up @@ -509,6 +509,8 @@ def _update_from_coordinator(self):
self._media_title = self._sources.get(self._tv.source_id)
self._media_channel = None

self._attr_assumed_state = True

@callback
def _handle_coordinator_update(self) -> None:
"""Handle updated data from the coordinator."""
Expand Down

0 comments on commit 00e563f

Please sign in to comment.