Add definitions for grouping media players (#41193)

* Add definitions for grouping media players

See https://github.com/home-assistant/architecture/issues/364

* Fix Google Assistant tests

* Define sync versions of async_join_players/async_unjoin

* Don't use async API in synchronous test methods

* Fix tests and make pylint happy

The method name `unjoin` is used by another component, so let's use
`unjoin_player` instead.

* Fix emulated_hue tests

The new media player entity in the `demo` component requires a tiny
adjustment in the emulated_hue tests.

* Use "target:" in service description

* Also use "name:" in service descriptions

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Dan Klaffenbach
2021-03-18 18:19:28 +01:00
committed by GitHub
parent 9fca001eed
commit 5174f63fd8
7 changed files with 143 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
ATTR_APP_ID = "app_id"
ATTR_APP_NAME = "app_name"
ATTR_GROUP_MEMBERS = "group_members"
ATTR_INPUT_SOURCE = "source"
ATTR_INPUT_SOURCE_LIST = "source_list"
ATTR_MEDIA_ALBUM_ARTIST = "media_album_artist"
@@ -75,9 +76,11 @@ MEDIA_TYPE_URL = "url"
MEDIA_TYPE_VIDEO = "video"
SERVICE_CLEAR_PLAYLIST = "clear_playlist"
SERVICE_JOIN = "join"
SERVICE_PLAY_MEDIA = "play_media"
SERVICE_SELECT_SOUND_MODE = "select_sound_mode"
SERVICE_SELECT_SOURCE = "select_source"
SERVICE_UNJOIN = "unjoin"
REPEAT_MODE_ALL = "all"
REPEAT_MODE_OFF = "off"
@@ -103,3 +106,4 @@ SUPPORT_SHUFFLE_SET = 32768
SUPPORT_SELECT_SOUND_MODE = 65536
SUPPORT_BROWSE_MEDIA = 131072
SUPPORT_REPEAT_SET = 262144
SUPPORT_GROUPING = 524288