From 15c0c4219c8d79cb0ad15efcb2daa588ef4acf76 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 13 Dec 2023 17:45:47 +0100 Subject: [PATCH] Align documented media_player properties with implementation (#2011) --- docs/core/entity/media-player.md | 44 ++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/docs/core/entity/media-player.md b/docs/core/entity/media-player.md index f6afc4f3..2fd360e7 100644 --- a/docs/core/entity/media-player.md +++ b/docs/core/entity/media-player.md @@ -14,17 +14,39 @@ A media player entity controls a media player. Derive a platform entity from [` Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data. ::: -| Name | Type | Default | Description -| ---- | ---- | ------- | ----------- -| supported_features | int | int | Flag supported features. -| sound_mode | string | None | The current sound mode of the media player -| sound_mode_list | list | None | Dynamic list of available sound modes (set by platform, empty means sound mode not supported) -| source | string | None | The currently selected input source for the media player. -| source_list | list | None | The list of possible input sources for the media player. (This list should contain human readable names, suitable for frontend display) -| media_image_url | string | None | URL that represents the current image. -| media_image_remotely_accessible | boolean | False | Return `True` if property `media_image_url` is accessible outside of the home network. -| device_class | string | `None` | Type of media player. -| group_members | list | `None` | A dynamic list of player entities which are currently grouped together for synchronous playback. If the platform has a concept of defining a group leader, the leader should be the first element in that list. +| Name | Type | Default | Description +| ------------------------------- | ----------------------------------------------- | ------- | ----------- +| app_id | str | None | `None` | ID of the current running app. +| app_name | str | None | `None` | Name of the current running app. +| device_class | MediaPlayerDeviceClass | None | `None` | Type of media player. +| group_members | list[str] | None | `None` | A dynamic list of player entities which are currently grouped together for synchronous playback. If the platform has a concept of defining a group leader, the leader should be the first element in that list. +| is_volume_muted | bool | None | `None` | `True` if if volume is currently muted. +| media_album_artist | str | None | `None` | Album artist of current playing media, music track only. +| media_album_name | str | None | `None` | Album name of current playing media, music track only. +| media_artist | str | None | `None` | Artist of current playing media, music track only. +| media_channel | str | None | `None` | Channel currently playing. +| media_content_id | str | None | `None` | Content ID of current playing media. +| media_content_type | MediaType | str | None | `None` | Content type of current playing media. +| media_duration | int | None | `None` | Duration of current playing media in seconds. +| media_episode | str | None | `None` | Episode of current playing media, TV show only. +| media_image_hash | str | None | `None` | Hash of media image, defaults to SHA256 of `media_image_url` if `media_image_url` is not `None`. +| media_image_remotely_accessible | bool | None | `False` | `True` if property `media_image_url` is accessible outside of the home network. +| media_image_url | str | None | `None` | Image URL of current playing media. +| media_playlist | str | None | `None` | Title of Playlist currently playing. +| media_position | int | None | `None` | Position of current playing media in seconds. +| media_position_updated_at | datetime | None | `None` | Timestamp of when `_attr_media_position` was last updated. The timestamp should be set by calling `homeassistant.util.dt.utcnow()`. +| media_season | str | None | `None` | Season of current playing media, TV show only. +| media_series_title | str | None | `None` | Title of series of current playing media, TV show only. +| media_title | str | None | `None` | Title of current playing media. +| media_track | int | None | `None` | Track number of current playing media, music track only. +| repeat | RepeatMode | str | None | `None` | Current repeat mode. +| shuffle | bool | None | `None` | `True` if shuffle is enabled. +| sound_mode | str | None | `None` | The current sound mode of the media player. +| sound_mode_list | list[str] | None | `None` | Dynamic list of available sound modes. +| source | str | None | `None` | The currently selected input source for the media player. +| source_list | list[str] | None | `None` | The list of possible input sources for the media player. (This list should contain human readable names, suitable for frontend display). +| state | MediaPlayerState | None | `None` | State of the media player. +| volume_level | float | None | `None` | Volume level of the media player in the range (0..1). ## Supported Features