Add missing feature support flag (#23417)

pull/23482/head
Andrew Sayre 2019-04-26 01:47:40 -05:00 committed by Fabian Affolter
parent b5725f8f19
commit d038d2426b
2 changed files with 6 additions and 5 deletions

View File

@ -5,11 +5,12 @@ import re
import voluptuous as vol
from homeassistant.components.media_player import (
MediaPlayerDevice, PLATFORM_SCHEMA)
PLATFORM_SCHEMA, MediaPlayerDevice)
from homeassistant.components.media_player.const import (
DOMAIN, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY,
SUPPORT_PREVIOUS_TRACK, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET, SUPPORT_VOLUME_STEP)
SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK, SUPPORT_TURN_OFF,
SUPPORT_TURN_ON, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET,
SUPPORT_VOLUME_STEP)
from homeassistant.const import (
CONF_HOST, CONF_NAME, CONF_PORT, STATE_OFF, STATE_PAUSED, STATE_PLAYING,
STATE_UNAVAILABLE)
@ -56,7 +57,7 @@ DEFAULT_PORT = 8090
SUPPORT_SOUNDTOUCH = SUPPORT_PAUSE | SUPPORT_VOLUME_STEP | \
SUPPORT_VOLUME_MUTE | SUPPORT_PREVIOUS_TRACK | \
SUPPORT_NEXT_TRACK | SUPPORT_TURN_OFF | \
SUPPORT_VOLUME_SET | SUPPORT_TURN_ON | SUPPORT_PLAY
SUPPORT_VOLUME_SET | SUPPORT_TURN_ON | SUPPORT_PLAY | SUPPORT_PLAY_MEDIA
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): cv.string,

View File

@ -372,7 +372,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase):
mock.MagicMock())
assert mocked_soundtouch_device.call_count == 1
all_devices = self.hass.data[soundtouch.DATA_SOUNDTOUCH]
assert all_devices[0].supported_features == 17853
assert all_devices[0].supported_features == 18365
@mock.patch('libsoundtouch.device.SoundTouchDevice.power_off')
@mock.patch('libsoundtouch.device.SoundTouchDevice.volume')