Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.heos.SourceManager Class Reference

Public Member Functions

None __init__ (self, favorites, inputs, *int retry_delay=COMMAND_RETRY_DELAY, int max_retry_attempts=COMMAND_RETRY_ATTEMPTS)
 
def connect_update (self, hass, controller)
 
def get_current_source (self, now_playing_media)
 
def play_source (self, str source, player)
 

Public Attributes

 favorites
 
 inputs
 
 max_retry_attempts
 
 retry_delay
 
 source_list
 

Private Member Functions

def _build_source_list (self)
 

Detailed Description

Class that manages sources for players.

Definition at line 388 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.heos.SourceManager.__init__ (   self,
  favorites,
  inputs,
*int   retry_delay = COMMAND_RETRY_DELAY,
int   max_retry_attempts = COMMAND_RETRY_ATTEMPTS 
)
Init input manager.

Definition at line 391 of file __init__.py.

Member Function Documentation

◆ _build_source_list()

def homeassistant.components.heos.SourceManager._build_source_list (   self)
private
Build a single list of inputs from various types.

Definition at line 406 of file __init__.py.

◆ connect_update()

def homeassistant.components.heos.SourceManager.connect_update (   self,
  hass,
  controller 
)
Connect listener for when sources change and signal player update.

EVENT_SOURCES_CHANGED is often raised multiple times in response to a
physical event therefore throttle it. Retrieving sources immediately
after the event may fail so retry.

Definition at line 464 of file __init__.py.

◆ get_current_source()

def homeassistant.components.heos.SourceManager.get_current_source (   self,
  now_playing_media 
)
Determine current source from now playing media.

Definition at line 441 of file __init__.py.

◆ play_source()

def homeassistant.components.heos.SourceManager.play_source (   self,
str  source,
  player 
)
Determine type of source and play it.

Definition at line 413 of file __init__.py.

Member Data Documentation

◆ favorites

homeassistant.components.heos.SourceManager.favorites

Definition at line 402 of file __init__.py.

◆ inputs

homeassistant.components.heos.SourceManager.inputs

Definition at line 403 of file __init__.py.

◆ max_retry_attempts

homeassistant.components.heos.SourceManager.max_retry_attempts

Definition at line 401 of file __init__.py.

◆ retry_delay

homeassistant.components.heos.SourceManager.retry_delay

Definition at line 400 of file __init__.py.

◆ source_list

homeassistant.components.heos.SourceManager.source_list

Definition at line 404 of file __init__.py.


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