Add selectors to Media Player service definitions (#46739)

This commit is contained in:
Franck Nijhof 2021-02-18 17:02:18 +01:00 committed by GitHub
parent a164a6cf80
commit 81c7b3b9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,168 +1,166 @@
# Describes the format for available media player services # Describes the format for available media player services
turn_on: turn_on:
description: Turn a media player power on. description: Turn a media player power on
fields: target:
entity_id:
description: Name(s) of entities to turn on.
example: "media_player.living_room_chromecast"
turn_off: turn_off:
description: Turn a media player power off. description: Turn a media player power off
fields: target:
entity_id:
description: Name(s) of entities to turn off.
example: "media_player.living_room_chromecast"
toggle: toggle:
description: Toggles a media player power state. description: Toggles a media player power state
fields: target:
entity_id:
description: Name(s) of entities to toggle.
example: "media_player.living_room_chromecast"
volume_up: volume_up:
description: Turn a media player volume up. description: Turn a media player volume up
fields: target:
entity_id:
description: Name(s) of entities to turn volume up on.
example: "media_player.living_room_sonos"
volume_down: volume_down:
description: Turn a media player volume down. description: Turn a media player volume down
fields: target:
entity_id:
description: Name(s) of entities to turn volume down on.
example: "media_player.living_room_sonos"
volume_mute: volume_mute:
description: Mute a media player's volume. description: Mute a media player's volume
target:
fields: fields:
entity_id:
description: Name(s) of entities to mute.
example: "media_player.living_room_sonos"
is_volume_muted: is_volume_muted:
name: Muted
description: True/false for mute/unmute. description: True/false for mute/unmute.
required: true
example: true example: true
selector:
boolean:
volume_set: volume_set:
description: Set a media player's volume level. description: Set a media player's volume level
target:
fields: fields:
entity_id:
description: Name(s) of entities to set volume level on.
example: "media_player.living_room_sonos"
volume_level: volume_level:
name: Level
description: Volume level to set as float. description: Volume level to set as float.
required: true
example: 0.6 example: 0.6
selector:
number:
min: 0
max: 1
step: 0.01
mode: slider
media_play_pause: media_play_pause:
description: Toggle media player play/pause state. description: Toggle media player play/pause state
fields: target:
entity_id:
description: Name(s) of entities to toggle play/pause state on.
example: "media_player.living_room_sonos"
media_play: media_play:
description: Send the media player the command for play. description: Send the media player the command for play
fields: target:
entity_id:
description: Name(s) of entities to play on.
example: "media_player.living_room_sonos"
media_pause: media_pause:
description: Send the media player the command for pause. description: Send the media player the command for pause
fields: target:
entity_id:
description: Name(s) of entities to pause on.
example: "media_player.living_room_sonos"
media_stop: media_stop:
description: Send the media player the stop command. description: Send the media player the stop command
fields: target:
entity_id:
description: Name(s) of entities to stop on.
example: "media_player.living_room_sonos"
media_next_track: media_next_track:
description: Send the media player the command for next track. description: Send the media player the command for next track
fields: target:
entity_id:
description: Name(s) of entities to send next track command to.
example: "media_player.living_room_sonos"
media_previous_track: media_previous_track:
description: Send the media player the command for previous track. description: Send the media player the command for previous track
fields: target:
entity_id:
description: Name(s) of entities to send previous track command to.
example: "media_player.living_room_sonos"
media_seek: media_seek:
description: Send the media player the command to seek in current playing media. description:
Send the media player the command to seek in current playing media
fields: fields:
entity_id:
description: Name(s) of entities to seek media on.
example: "media_player.living_room_chromecast"
seek_position: seek_position:
name: Position
description: Position to seek to. The format is platform dependent. description: Position to seek to. The format is platform dependent.
required: true
example: 100 example: 100
selector:
number:
min: 0
max: 9223372036854775807
step: 0.01
mode: box
play_media: play_media:
description: Send the media player the command for playing media. description: Send the media player the command for playing media
target:
fields: fields:
entity_id:
description: Name(s) of entities to seek media on
example: "media_player.living_room_chromecast"
media_content_id: media_content_id:
name: Content ID
description: The ID of the content to play. Platform dependent. description: The ID of the content to play. Platform dependent.
required: true
example: "https://home-assistant.io/images/cast/splash.png" example: "https://home-assistant.io/images/cast/splash.png"
selector:
text:
media_content_type: media_content_type:
description: The type of the content to play. Must be one of image, music, tvshow, video, episode, channel or playlist name: Content type
description:
The type of the content to play. Must be one of image, music, tvshow,
video, episode, channel or playlist.
required: true
example: "music" example: "music"
selector:
text:
select_source: select_source:
description: Send the media player the command to change input source. description: Send the media player the command to change input source
target:
fields: fields:
entity_id:
description: Name(s) of entities to change source on.
example: "media_player.txnr535_0009b0d81f82"
source: source:
name: Source
description: Name of the source to switch to. Platform dependent. description: Name of the source to switch to. Platform dependent.
required: true
example: "video1" example: "video1"
selector:
text:
select_sound_mode: select_sound_mode:
description: Send the media player the command to change sound mode. description: Send the media player the command to change sound mode
target:
fields: fields:
entity_id:
description: Name(s) of entities to change sound mode on.
example: "media_player.marantz"
sound_mode: sound_mode:
name: Sound mode
description: Name of the sound mode to switch to. description: Name of the sound mode to switch to.
example: "Music" example: "Music"
selector:
text:
clear_playlist: clear_playlist:
description: Send the media player the command to clear players playlist. description: Send the media player the command to clear players playlist
fields: target:
entity_id:
description: Name(s) of entities to change source on.
example: "media_player.living_room_chromecast"
shuffle_set: shuffle_set:
description: Set shuffling state. description: Set shuffling state
target:
fields: fields:
entity_id:
description: Name(s) of entities to set.
example: "media_player.spotify"
shuffle: shuffle:
name: Shuffle
description: True/false for enabling/disabling shuffle. description: True/false for enabling/disabling shuffle.
required: true
example: true example: true
selector:
boolean:
repeat_set: repeat_set:
description: Set repeat mode. description: Set repeat mode
target:
fields: fields:
entity_id:
description: Name(s) of entities to set.
example: "media_player.sonos"
repeat: repeat:
name: Repeat mode
description: Repeat mode to set (off, all, one). description: Repeat mode to set (off, all, one).
required: true
example: "off" example: "off"
selector:
select:
options:
- "off"
- "all"
- "one"