Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.demo.media_player Namespace Reference

Classes

class  AbstractDemoPlayer
 
class  DemoBrowsePlayer
 
class  DemoGroupPlayer
 
class  DemoMusicPlayer
 
class  DemoTVShowPlayer
 
class  DemoYoutubePlayer
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 BROWSE_PLAYER_SUPPORT = MediaPlayerEntityFeature.BROWSE_MEDIA
 
string DEFAULT_SOUND_MODE = "Music"
 
tuple MUSIC_PLAYER_SUPPORT
 
tuple NETFLIX_PLAYER_SUPPORT
 
list SOUND_MODE_LIST = ["Music", "Movie"]
 
tuple YOUTUBE_PLAYER_SUPPORT
 

Detailed Description

Demo implementation of the media player.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.demo.media_player.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up the Demo config entry.

Definition at line 22 of file media_player.py.

Variable Documentation

◆ BROWSE_PLAYER_SUPPORT

homeassistant.components.demo.media_player.BROWSE_PLAYER_SUPPORT = MediaPlayerEntityFeature.BROWSE_MEDIA

Definition at line 96 of file media_player.py.

◆ DEFAULT_SOUND_MODE

string homeassistant.components.demo.media_player.DEFAULT_SOUND_MODE = "Music"

Definition at line 49 of file media_player.py.

◆ MUSIC_PLAYER_SUPPORT

tuple homeassistant.components.demo.media_player.MUSIC_PLAYER_SUPPORT
Initial value:
1 = (
2  MediaPlayerEntityFeature.PAUSE
3  | MediaPlayerEntityFeature.VOLUME_SET
4  | MediaPlayerEntityFeature.VOLUME_MUTE
5  | MediaPlayerEntityFeature.TURN_ON
6  | MediaPlayerEntityFeature.TURN_OFF
7  | MediaPlayerEntityFeature.CLEAR_PLAYLIST
8  | MediaPlayerEntityFeature.GROUPING
9  | MediaPlayerEntityFeature.PLAY
10  | MediaPlayerEntityFeature.SHUFFLE_SET
11  | MediaPlayerEntityFeature.REPEAT_SET
12  | MediaPlayerEntityFeature.VOLUME_STEP
13  | MediaPlayerEntityFeature.PREVIOUS_TRACK
14  | MediaPlayerEntityFeature.NEXT_TRACK
15  | MediaPlayerEntityFeature.SELECT_SOUND_MODE
16  | MediaPlayerEntityFeature.STOP
17 )

Definition at line 65 of file media_player.py.

◆ NETFLIX_PLAYER_SUPPORT

tuple homeassistant.components.demo.media_player.NETFLIX_PLAYER_SUPPORT
Initial value:
1 = (
2  MediaPlayerEntityFeature.PAUSE
3  | MediaPlayerEntityFeature.TURN_ON
4  | MediaPlayerEntityFeature.TURN_OFF
5  | MediaPlayerEntityFeature.SELECT_SOURCE
6  | MediaPlayerEntityFeature.PLAY
7  | MediaPlayerEntityFeature.SHUFFLE_SET
8  | MediaPlayerEntityFeature.PREVIOUS_TRACK
9  | MediaPlayerEntityFeature.NEXT_TRACK
10  | MediaPlayerEntityFeature.SELECT_SOUND_MODE
11  | MediaPlayerEntityFeature.STOP
12 )

Definition at line 83 of file media_player.py.

◆ SOUND_MODE_LIST

list homeassistant.components.demo.media_player.SOUND_MODE_LIST = ["Music", "Movie"]

Definition at line 48 of file media_player.py.

◆ YOUTUBE_PLAYER_SUPPORT

tuple homeassistant.components.demo.media_player.YOUTUBE_PLAYER_SUPPORT
Initial value:
1 = (
2  MediaPlayerEntityFeature.PAUSE
3  | MediaPlayerEntityFeature.VOLUME_SET
4  | MediaPlayerEntityFeature.VOLUME_MUTE
5  | MediaPlayerEntityFeature.TURN_ON
6  | MediaPlayerEntityFeature.TURN_OFF
7  | MediaPlayerEntityFeature.PLAY_MEDIA
8  | MediaPlayerEntityFeature.PLAY
9  | MediaPlayerEntityFeature.SHUFFLE_SET
10  | MediaPlayerEntityFeature.SELECT_SOUND_MODE
11  | MediaPlayerEntityFeature.SEEK
12  | MediaPlayerEntityFeature.STOP
13 )

Definition at line 51 of file media_player.py.