mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Avoid sending Standby when already off (#56306)
This commit is contained in:
parent
8341ae12d3
commit
175f207d28
@ -213,9 +213,12 @@ class PhilipsTVMediaPlayer(CoordinatorEntity, MediaPlayerEntity):
|
||||
|
||||
async def async_turn_off(self):
|
||||
"""Turn off the device."""
|
||||
await self._tv.sendKey("Standby")
|
||||
self._state = STATE_OFF
|
||||
await self._async_update_soon()
|
||||
if self._state == STATE_ON:
|
||||
await self._tv.sendKey("Standby")
|
||||
self._state = STATE_OFF
|
||||
await self._async_update_soon()
|
||||
else:
|
||||
_LOGGER.debug("Ignoring turn off when already in expected state")
|
||||
|
||||
async def async_volume_up(self):
|
||||
"""Send volume up command."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user