mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Add Media Stop Support to BraviaTV Mediaplayer (#32220)
* Add media_stop to braviatv mediaplayer * Fix typo in media_stop() Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
parent
9da5bc9dce
commit
fc98faa425
@ -2,7 +2,7 @@
|
|||||||
"domain": "braviatv",
|
"domain": "braviatv",
|
||||||
"name": "Sony Bravia TV",
|
"name": "Sony Bravia TV",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/braviatv",
|
"documentation": "https://www.home-assistant.io/integrations/braviatv",
|
||||||
"requirements": ["bravia-tv==1.0", "getmac==0.8.1"],
|
"requirements": ["bravia-tv==1.0.1", "getmac==0.8.1"],
|
||||||
"dependencies": ["configurator"],
|
"dependencies": ["configurator"],
|
||||||
"codeowners": ["@robbiet480"]
|
"codeowners": ["@robbiet480"]
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ from homeassistant.components.media_player.const import (
|
|||||||
SUPPORT_PLAY,
|
SUPPORT_PLAY,
|
||||||
SUPPORT_PREVIOUS_TRACK,
|
SUPPORT_PREVIOUS_TRACK,
|
||||||
SUPPORT_SELECT_SOURCE,
|
SUPPORT_SELECT_SOURCE,
|
||||||
|
SUPPORT_STOP,
|
||||||
SUPPORT_TURN_OFF,
|
SUPPORT_TURN_OFF,
|
||||||
SUPPORT_TURN_ON,
|
SUPPORT_TURN_ON,
|
||||||
SUPPORT_VOLUME_MUTE,
|
SUPPORT_VOLUME_MUTE,
|
||||||
@ -47,6 +48,7 @@ SUPPORT_BRAVIA = (
|
|||||||
| SUPPORT_TURN_OFF
|
| SUPPORT_TURN_OFF
|
||||||
| SUPPORT_SELECT_SOURCE
|
| SUPPORT_SELECT_SOURCE
|
||||||
| SUPPORT_PLAY
|
| SUPPORT_PLAY
|
||||||
|
| SUPPORT_STOP
|
||||||
)
|
)
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
@ -351,6 +353,11 @@ class BraviaTVDevice(MediaPlayerDevice):
|
|||||||
self._playing = False
|
self._playing = False
|
||||||
self._braviarc.media_pause()
|
self._braviarc.media_pause()
|
||||||
|
|
||||||
|
def media_stop(self):
|
||||||
|
"""Send media stop command to media player."""
|
||||||
|
self._playing = False
|
||||||
|
self._braviarc.media_stop()
|
||||||
|
|
||||||
def media_next_track(self):
|
def media_next_track(self):
|
||||||
"""Send next track command."""
|
"""Send next track command."""
|
||||||
self._braviarc.media_next_track()
|
self._braviarc.media_next_track()
|
||||||
|
@ -344,7 +344,7 @@ bomradarloop==0.1.3
|
|||||||
boto3==1.9.252
|
boto3==1.9.252
|
||||||
|
|
||||||
# homeassistant.components.braviatv
|
# homeassistant.components.braviatv
|
||||||
bravia-tv==1.0
|
bravia-tv==1.0.1
|
||||||
|
|
||||||
# homeassistant.components.broadlink
|
# homeassistant.components.broadlink
|
||||||
broadlink==0.12.0
|
broadlink==0.12.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user