From 00e563f1b8f696e2b1fffc853c38e1d11d0a4d85 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sun, 8 Jan 2023 00:14:25 +0100 Subject: [PATCH] Switch play pause method in philips js (#85343) fixes undefined --- homeassistant/components/philips_js/media_player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/philips_js/media_player.py b/homeassistant/components/philips_js/media_player.py index d9ea06c2f2c..684dafbc750 100644 --- a/homeassistant/components/philips_js/media_player.py +++ b/homeassistant/components/philips_js/media_player.py @@ -210,7 +210,7 @@ class PhilipsTVMediaPlayer( 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() @@ -509,6 +509,8 @@ class PhilipsTVMediaPlayer( 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."""