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

Classes

class  PandoraMediaPlayer
 

Functions

def _pianobar_exists ()
 
None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary CMD_MAP
 
 CURRENT_SONG_PATTERN = re.compile(r'"(.*?)"\s+by\s+"(.*?)"\son\s+"(.*?)"', re.MULTILINE)
 
 MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=2)
 
 STATION_PATTERN = re.compile(r'Station\s"(.+?)"', re.MULTILINE)
 

Detailed Description

Component for controlling Pandora stations through the pianobar client.

Function Documentation

◆ _pianobar_exists()

def homeassistant.components.pandora.media_player._pianobar_exists ( )
private
Verify that Pianobar is properly installed.

Definition at line 327 of file media_player.py.

◆ setup_platform()

None homeassistant.components.pandora.media_player.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Pandora media player platform.

Definition at line 48 of file media_player.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.pandora.media_player._LOGGER = logging.getLogger(__name__)
private

Definition at line 33 of file media_player.py.

◆ CMD_MAP

dictionary homeassistant.components.pandora.media_player.CMD_MAP
Initial value:
1 = {
2  SERVICE_MEDIA_NEXT_TRACK: "n",
3  SERVICE_MEDIA_PLAY_PAUSE: "p",
4  SERVICE_MEDIA_PLAY: "p",
5  SERVICE_VOLUME_UP: ")",
6  SERVICE_VOLUME_DOWN: "(",
7 }

Definition at line 36 of file media_player.py.

◆ CURRENT_SONG_PATTERN

homeassistant.components.pandora.media_player.CURRENT_SONG_PATTERN = re.compile(r'"(.*?)"\s+by\s+"(.*?)"\son\s+"(.*?)"', re.MULTILINE)

Definition at line 44 of file media_player.py.

◆ MIN_TIME_BETWEEN_UPDATES

homeassistant.components.pandora.media_player.MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=2)

Definition at line 43 of file media_player.py.

◆ STATION_PATTERN

homeassistant.components.pandora.media_player.STATION_PATTERN = re.compile(r'Station\s"(.+?)"', re.MULTILINE)

Definition at line 45 of file media_player.py.