Use EntityFeature enums in forked_daapd (#69572)
parent
cac8d71764
commit
2bc25aa92a
|
@ -1,21 +1,5 @@
|
||||||
"""Const for forked-daapd."""
|
"""Const for forked-daapd."""
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player import MediaPlayerEntityFeature
|
||||||
SUPPORT_BROWSE_MEDIA,
|
|
||||||
SUPPORT_CLEAR_PLAYLIST,
|
|
||||||
SUPPORT_NEXT_TRACK,
|
|
||||||
SUPPORT_PAUSE,
|
|
||||||
SUPPORT_PLAY,
|
|
||||||
SUPPORT_PLAY_MEDIA,
|
|
||||||
SUPPORT_PREVIOUS_TRACK,
|
|
||||||
SUPPORT_SEEK,
|
|
||||||
SUPPORT_SELECT_SOURCE,
|
|
||||||
SUPPORT_SHUFFLE_SET,
|
|
||||||
SUPPORT_STOP,
|
|
||||||
SUPPORT_TURN_OFF,
|
|
||||||
SUPPORT_TURN_ON,
|
|
||||||
SUPPORT_VOLUME_MUTE,
|
|
||||||
SUPPORT_VOLUME_SET,
|
|
||||||
)
|
|
||||||
|
|
||||||
CALLBACK_TIMEOUT = 8 # max time between command and callback from forked-daapd server
|
CALLBACK_TIMEOUT = 8 # max time between command and callback from forked-daapd server
|
||||||
CONF_LIBRESPOT_JAVA_PORT = "librespot_java_port"
|
CONF_LIBRESPOT_JAVA_PORT = "librespot_java_port"
|
||||||
|
@ -65,23 +49,26 @@ STARTUP_DATA = {
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
}
|
}
|
||||||
SUPPORTED_FEATURES = (
|
SUPPORTED_FEATURES = (
|
||||||
SUPPORT_PLAY
|
MediaPlayerEntityFeature.PLAY
|
||||||
| SUPPORT_PAUSE
|
| MediaPlayerEntityFeature.PAUSE
|
||||||
| SUPPORT_STOP
|
| MediaPlayerEntityFeature.STOP
|
||||||
| SUPPORT_SEEK
|
| MediaPlayerEntityFeature.SEEK
|
||||||
| SUPPORT_VOLUME_SET
|
| MediaPlayerEntityFeature.VOLUME_SET
|
||||||
| SUPPORT_VOLUME_MUTE
|
| MediaPlayerEntityFeature.VOLUME_MUTE
|
||||||
| SUPPORT_PREVIOUS_TRACK
|
| MediaPlayerEntityFeature.PREVIOUS_TRACK
|
||||||
| SUPPORT_NEXT_TRACK
|
| MediaPlayerEntityFeature.NEXT_TRACK
|
||||||
| SUPPORT_CLEAR_PLAYLIST
|
| MediaPlayerEntityFeature.CLEAR_PLAYLIST
|
||||||
| SUPPORT_SELECT_SOURCE
|
| MediaPlayerEntityFeature.SELECT_SOURCE
|
||||||
| SUPPORT_SHUFFLE_SET
|
| MediaPlayerEntityFeature.SHUFFLE_SET
|
||||||
| SUPPORT_TURN_ON
|
| MediaPlayerEntityFeature.TURN_ON
|
||||||
| SUPPORT_TURN_OFF
|
| MediaPlayerEntityFeature.TURN_OFF
|
||||||
| SUPPORT_PLAY_MEDIA
|
| MediaPlayerEntityFeature.PLAY_MEDIA
|
||||||
| SUPPORT_BROWSE_MEDIA
|
| MediaPlayerEntityFeature.BROWSE_MEDIA
|
||||||
)
|
)
|
||||||
SUPPORTED_FEATURES_ZONE = (
|
SUPPORTED_FEATURES_ZONE = (
|
||||||
SUPPORT_VOLUME_SET | SUPPORT_VOLUME_MUTE | SUPPORT_TURN_ON | SUPPORT_TURN_OFF
|
MediaPlayerEntityFeature.VOLUME_SET
|
||||||
|
| MediaPlayerEntityFeature.VOLUME_MUTE
|
||||||
|
| MediaPlayerEntityFeature.TURN_ON
|
||||||
|
| MediaPlayerEntityFeature.TURN_OFF
|
||||||
)
|
)
|
||||||
TTS_TIMEOUT = 20 # max time to wait between TTS getting sent and starting to play
|
TTS_TIMEOUT = 20 # max time to wait between TTS getting sent and starting to play
|
||||||
|
|
Loading…
Reference in New Issue