Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.sisyphus.media_player.SisyphusPlayer Class Reference
Inheritance diagram for homeassistant.components.sisyphus.media_player.SisyphusPlayer:
[legend]
Collaboration diagram for homeassistant.components.sisyphus.media_player.SisyphusPlayer:
[legend]

Public Member Functions

def __init__ (self, name, host, table)
 
None async_added_to_hass (self)
 
None async_media_next_track (self)
 
None async_media_pause (self)
 
None async_media_play (self)
 
None async_media_previous_track (self)
 
None async_set_shuffle (self, bool shuffle)
 
None async_set_volume_level (self, float volume)
 
None async_turn_off (self)
 
None async_turn_on (self)
 
None async_update (self)
 
None async_volume_down (self)
 
None async_volume_up (self)
 
bool available (self)
 
def media_content_id (self)
 
def media_content_type (self)
 
def media_duration (self)
 
def media_image_url (self)
 
def media_playlist (self)
 
def media_position (self)
 
def media_position_updated_at (self)
 
def media_title (self)
 
def name (self)
 
def shuffle (self)
 
MediaPlayerState|None state (self)
 
def unique_id (self)
 
def volume_level (self)
 
- Public Member Functions inherited from homeassistant.components.media_player.MediaPlayerEntity
str access_token (self)
 
str|None app_id (self)
 
str|None app_name (self)
 
BrowseMedia async_browse_media (self, MediaType|str|None media_content_type=None, str|None media_content_id=None)
 
None async_clear_playlist (self)
 
tuple[bytes|None, str|Noneasync_get_browse_image (self, str media_content_type, str media_content_id, str|None media_image_id=None)
 
tuple[bytes|None, str|Noneasync_get_media_image (self)
 
None async_join_players (self, list[str] group_members)
 
None async_media_play_pause (self)
 
None async_media_seek (self, float position)
 
None async_media_stop (self)
 
None async_mute_volume (self, bool mute)
 
None async_play_media (self, MediaType|str media_type, str media_id, **Any kwargs)
 
None async_select_sound_mode (self, str sound_mode)
 
None async_select_source (self, str source)
 
None async_set_repeat (self, RepeatMode repeat)
 
None async_toggle (self)
 
None async_unjoin_player (self)
 
dict[str, Any] capability_attributes (self)
 
None clear_playlist (self)
 
MediaPlayerDeviceClass|None device_class (self)
 
str|None entity_picture (self)
 
str get_browse_image_url (self, str media_content_type, str media_content_id, str|None media_image_id=None)
 
list[str]|None group_members (self)
 
bool|None is_volume_muted (self)
 
None join_players (self, list[str] group_members)
 
str|None media_album_artist (self)
 
str|None media_album_name (self)
 
str|None media_artist (self)
 
str|None media_channel (self)
 
str|None media_episode (self)
 
str|None media_image_hash (self)
 
str|None media_image_local (self)
 
bool media_image_remotely_accessible (self)
 
None media_next_track (self)
 
None media_pause (self)
 
None media_play (self)
 
None media_previous_track (self)
 
str|None media_season (self)
 
None media_seek (self, float position)
 
str|None media_series_title (self)
 
None media_stop (self)
 
int|None media_track (self)
 
None mute_volume (self, bool mute)
 
None play_media (self, MediaType|str media_type, str media_id, **Any kwargs)
 
RepeatMode|str|None repeat (self)
 
None select_sound_mode (self, str sound_mode)
 
None select_source (self, str source)
 
None set_repeat (self, RepeatMode repeat)
 
None set_shuffle (self, bool shuffle)
 
None set_volume_level (self, float volume)
 
str|None sound_mode (self)
 
list[str]|None sound_mode_list (self)
 
str|None source (self)
 
list[str]|None source_list (self)
 
dict[str, Any] state_attributes (self)
 
bool support_clear_playlist (self)
 
bool support_grouping (self)
 
bool support_next_track (self)
 
bool support_pause (self)
 
bool support_play (self)
 
bool support_play_media (self)
 
bool support_previous_track (self)
 
bool support_seek (self)
 
bool support_select_sound_mode (self)
 
bool support_select_source (self)
 
bool support_shuffle_set (self)
 
bool support_stop (self)
 
bool support_volume_mute (self)
 
bool support_volume_set (self)
 
MediaPlayerEntityFeature supported_features (self)
 
MediaPlayerEntityFeature supported_features_compat (self)
 
None turn_off (self)
 
None turn_on (self)
 
None unjoin_player (self)
 
float volume_step (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Private Member Functions

def _get_current_track_index (self)
 

Private Attributes

 _host
 
 _name
 
 _table
 

Static Private Attributes

tuple _attr_supported_features
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.media_player.MediaPlayerEntity
 state
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.media_player.MediaPlayerEntity
 bool
 
 MediaPlayerEntityFeature
 
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Representation of a Sisyphus table as a media player device.

Definition at line 43 of file media_player.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.__init__ (   self,
  name,
  host,
  table 
)
Initialize the Sisyphus media device.

Definition at line 58 of file media_player.py.

Member Function Documentation

◆ _get_current_track_index()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer._get_current_track_index (   self)
private

Definition at line 207 of file media_player.py.

◆ async_added_to_hass()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_added_to_hass (   self)
Add listeners after this object has been initialized.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 64 of file media_player.py.

◆ async_media_next_track()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_media_next_track (   self)
Skip to next track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 191 of file media_player.py.

◆ async_media_pause()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_media_pause (   self)
Pause.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 187 of file media_player.py.

◆ async_media_play()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_media_play (   self)
Start playing.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 183 of file media_player.py.

◆ async_media_previous_track()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_media_previous_track (   self)
Skip to previous track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 199 of file media_player.py.

◆ async_set_shuffle()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_set_shuffle (   self,
bool  shuffle 
)
Change the shuffle mode of the current playlist.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 112 of file media_player.py.

◆ async_set_volume_level()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_set_volume_level (   self,
float  volume 
)
Set playback speed (0..1).

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 179 of file media_player.py.

◆ async_turn_off()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_turn_off (   self)
Put the table to sleep.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 167 of file media_player.py.

◆ async_turn_on()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_turn_on (   self)
Wake up a sleeping table.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 163 of file media_player.py.

◆ async_update()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_update (   self)
Force update table state.

Definition at line 68 of file media_player.py.

◆ async_volume_down()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_volume_down (   self)
Slow down playback.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 171 of file media_player.py.

◆ async_volume_up()

None homeassistant.components.sisyphus.media_player.SisyphusPlayer.async_volume_up (   self)
Speed up playback.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 175 of file media_player.py.

◆ available()

bool homeassistant.components.sisyphus.media_player.SisyphusPlayer.available (   self)
Return true if the table is responding to heartbeats.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 78 of file media_player.py.

◆ media_content_id()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_content_id (   self)
Return the track ID of the current track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 132 of file media_player.py.

◆ media_content_type()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_content_type (   self)
Return the content type currently playing; i.e. a Sisyphus track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 127 of file media_player.py.

◆ media_duration()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_duration (   self)
Return the total time it will take to run this track at the current speed.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 137 of file media_player.py.

◆ media_image_url()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_image_url (   self)
Return the URL for a thumbnail image of the current track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 155 of file media_player.py.

◆ media_playlist()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_playlist (   self)
Return the name of the current playlist.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 117 of file media_player.py.

◆ media_position()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_position (   self)
Return the current position within the track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 142 of file media_player.py.

◆ media_position_updated_at()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_position_updated_at (   self)
Return the last time we got a position update.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 150 of file media_player.py.

◆ media_title()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.media_title (   self)
Return the title of the current track.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 122 of file media_player.py.

◆ name()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.name (   self)
Return the name of the table.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 83 of file media_player.py.

◆ shuffle()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.shuffle (   self)
Return True if the current playlist is in shuffle mode.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 108 of file media_player.py.

◆ state()

MediaPlayerState | None homeassistant.components.sisyphus.media_player.SisyphusPlayer.state (   self)
Return the current state of the table; sleeping maps to off.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 88 of file media_player.py.

◆ unique_id()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.unique_id (   self)
Return the UUID of the table.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 73 of file media_player.py.

◆ volume_level()

def homeassistant.components.sisyphus.media_player.SisyphusPlayer.volume_level (   self)
Return the current playback speed (0..1).

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 103 of file media_player.py.

Member Data Documentation

◆ _attr_supported_features

tuple homeassistant.components.sisyphus.media_player.SisyphusPlayer._attr_supported_features
staticprivate
Initial value:
= (
MediaPlayerEntityFeature.VOLUME_MUTE
| MediaPlayerEntityFeature.VOLUME_SET
| MediaPlayerEntityFeature.TURN_OFF
| MediaPlayerEntityFeature.TURN_ON
| MediaPlayerEntityFeature.PAUSE
| MediaPlayerEntityFeature.SHUFFLE_SET
| MediaPlayerEntityFeature.PREVIOUS_TRACK
| MediaPlayerEntityFeature.NEXT_TRACK
| MediaPlayerEntityFeature.PLAY
)

Definition at line 46 of file media_player.py.

◆ _host

homeassistant.components.sisyphus.media_player.SisyphusPlayer._host
private

Definition at line 61 of file media_player.py.

◆ _name

homeassistant.components.sisyphus.media_player.SisyphusPlayer._name
private

Definition at line 60 of file media_player.py.

◆ _table

homeassistant.components.sisyphus.media_player.SisyphusPlayer._table
private

Definition at line 62 of file media_player.py.


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