Skip to content

Commit

Permalink
Change keys for Samsung TV next and prev track command (home-assistan…
Browse files Browse the repository at this point in the history
  • Loading branch information
tulindo authored and MartinHjelmare committed Nov 15, 2019
1 parent 5e973dd commit b4ccc02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/samsungtv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ def media_pause(self):

def media_next_track(self):
"""Send next track command."""
self.send_key("KEY_FF")
self.send_key("KEY_CHUP")

def media_previous_track(self):
"""Send the previous track command."""
self.send_key("KEY_REWIND")
self.send_key("KEY_CHDOWN")

async def async_play_media(self, media_type, media_id, **kwargs):
"""Support changing a channel."""
Expand Down
4 changes: 2 additions & 2 deletions tests/components/samsungtv/test_media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ async def test_media_next_track(hass, remote):
)
# key and update called
assert remote.control.call_count == 2
assert remote.control.call_args_list == [call("KEY_FF"), call("KEY")]
assert remote.control.call_args_list == [call("KEY_CHUP"), call("KEY")]


async def test_media_previous_track(hass, remote):
Expand All @@ -554,7 +554,7 @@ async def test_media_previous_track(hass, remote):
)
# key and update called
assert remote.control.call_count == 2
assert remote.control.call_args_list == [call("KEY_REWIND"), call("KEY")]
assert remote.control.call_args_list == [call("KEY_CHDOWN"), call("KEY")]


async def test_turn_on_with_mac(hass, remote, wakeonlan):
Expand Down

0 comments on commit b4ccc02

Please sign in to comment.