Skip to content

Commit

Permalink
Merge pull request #25 from Knapoc/android-power-off-command
Browse files Browse the repository at this point in the history
Android power off command
  • Loading branch information
gerard33 committed Mar 17, 2020
2 parents 9ab6a50 + 60d219f commit 4a9e699
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/braviatv_psk/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Bravia TV PSK",
"documentation": "https://github.com/custom-components/media_player.braviatv_psk",
"requirements": [
"pySonyBraviaPSK==0.1.8"
"pySonyBraviaPSK==0.1.9"
],
"dependencies": [],
"codeowners": [
Expand Down
11 changes: 9 additions & 2 deletions custom_components/braviatv_psk/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,15 @@ def turn_on(self):
self._program_name = TV_WAIT

def turn_off(self):
"""Turn off media player."""
self._braviarc.turn_off()
"""Turn the media player off.
Use a different command for Android since IRCC is not working reliable.
"""
if self._android:
self._braviarc.turn_off_command()
else:
self._braviarc.turn_off()

self._state = STATE_OFF

def volume_up(self):
Expand Down

0 comments on commit 4a9e699

Please sign in to comment.