Change keys for Samsung TV next and prev track command (#28213)

This commit is contained in:
Paolo Tuninetto 2019-11-15 09:53:16 +01:00 committed by Martin Hjelmare
parent 5e973dd017
commit b4ccc0202a
2 changed files with 4 additions and 4 deletions

View file

@ -312,11 +312,11 @@ class SamsungTVDevice(MediaPlayerDevice):
def media_next_track(self): def media_next_track(self):
"""Send next track command.""" """Send next track command."""
self.send_key("KEY_FF") self.send_key("KEY_CHUP")
def media_previous_track(self): def media_previous_track(self):
"""Send the previous track command.""" """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): async def async_play_media(self, media_type, media_id, **kwargs):
"""Support changing a channel.""" """Support changing a channel."""

View file

@ -543,7 +543,7 @@ async def test_media_next_track(hass, remote):
) )
# key and update called # key and update called
assert remote.control.call_count == 2 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): async def test_media_previous_track(hass, remote):
@ -554,7 +554,7 @@ async def test_media_previous_track(hass, remote):
) )
# key and update called # key and update called
assert remote.control.call_count == 2 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): async def test_turn_on_with_mac(hass, remote, wakeonlan):