Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.media_player.browse_media.BrowseMedia Class Reference
Inheritance diagram for homeassistant.components.media_player.browse_media.BrowseMedia:
[legend]

Public Member Functions

None __init__ (self, *MediaClass|str media_class, str media_content_id, MediaType|str media_content_type, str title, bool can_play, bool can_expand, Sequence[BrowseMedia]|None children=None, MediaClass|str|None children_media_class=None, str|None thumbnail=None, int not_shown=0)
 
str __repr__ (self)
 
dict[str, Any] as_dict (self, *bool parent=True)
 
None calculate_children_class (self)
 

Public Attributes

 can_expand
 
 can_play
 
 children
 
 children_media_class
 
 media_class
 
 media_content_id
 
 media_content_type
 
 not_shown
 
 thumbnail
 
 title
 

Detailed Description

Represent a browsable media file.

Definition at line 92 of file browse_media.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.media_player.browse_media.BrowseMedia.__init__ (   self,
*MediaClass | str  media_class,
str  media_content_id,
MediaType | str  media_content_type,
str  title,
bool  can_play,
bool  can_expand,
Sequence[BrowseMedia] | None   children = None,
MediaClass | str | None   children_media_class = None,
str | None   thumbnail = None,
int   not_shown = 0 
)
Initialize browse media item.

Definition at line 95 of file browse_media.py.

Member Function Documentation

◆ __repr__()

str homeassistant.components.media_player.browse_media.BrowseMedia.__repr__ (   self)
Return representation of browse media.

Definition at line 159 of file browse_media.py.

◆ as_dict()

dict[str, Any] homeassistant.components.media_player.browse_media.BrowseMedia.as_dict (   self,
*bool   parent = True 
)
Convert Media class to browse media dictionary.

Definition at line 121 of file browse_media.py.

◆ calculate_children_class()

None homeassistant.components.media_player.browse_media.BrowseMedia.calculate_children_class (   self)
Count the children media classes and calculate the correct class.

Definition at line 151 of file browse_media.py.

Member Data Documentation

◆ can_expand

homeassistant.components.media_player.browse_media.BrowseMedia.can_expand

Definition at line 115 of file browse_media.py.

◆ can_play

homeassistant.components.media_player.browse_media.BrowseMedia.can_play

Definition at line 114 of file browse_media.py.

◆ children

homeassistant.components.media_player.browse_media.BrowseMedia.children

Definition at line 116 of file browse_media.py.

◆ children_media_class

homeassistant.components.media_player.browse_media.BrowseMedia.children_media_class

Definition at line 117 of file browse_media.py.

◆ media_class

homeassistant.components.media_player.browse_media.BrowseMedia.media_class

Definition at line 110 of file browse_media.py.

◆ media_content_id

homeassistant.components.media_player.browse_media.BrowseMedia.media_content_id

Definition at line 111 of file browse_media.py.

◆ media_content_type

homeassistant.components.media_player.browse_media.BrowseMedia.media_content_type

Definition at line 112 of file browse_media.py.

◆ not_shown

homeassistant.components.media_player.browse_media.BrowseMedia.not_shown

Definition at line 119 of file browse_media.py.

◆ thumbnail

homeassistant.components.media_player.browse_media.BrowseMedia.thumbnail

Definition at line 118 of file browse_media.py.

◆ title

homeassistant.components.media_player.browse_media.BrowseMedia.title

Definition at line 113 of file browse_media.py.


The documentation for this class was generated from the following file: