Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.sonos.const Namespace Reference

Variables

 AVAILABILITY_CHECK_INTERVAL = datetime.timedelta(minutes=1)
 
float AVAILABILITY_TIMEOUT = AVAILABILITY_CHECK_INTERVAL.total_seconds() * 4.5
 
 BATTERY_SCAN_INTERVAL = datetime.timedelta(minutes=15)
 
string DATA_SONOS = "sonos_media_player"
 
string DATA_SONOS_DISCOVERY_MANAGER = "sonos_discovery_manager"
 
 DISCOVERY_INTERVAL = datetime.timedelta(seconds=60)
 
string DOMAIN = "sonos"
 
list EXPANDABLE_MEDIA_TYPES
 
dictionary LIBRARY_TITLES_MAPPING
 
tuple MODELS_LINEIN_AND_TV = ("AMP",)
 
tuple MODELS_LINEIN_ONLY
 
tuple MODELS_TV_ONLY
 
list PLATFORMS
 
list PLAYABLE_MEDIA_TYPES
 
 SCAN_INTERVAL = datetime.timedelta(seconds=10)
 
string SONOS_ALARMS_UPDATED = "sonos_alarms_updated"
 
string SONOS_ALBUM = "albums"
 
string SONOS_ALBUM_ARTIST = "album_artists"
 
string SONOS_ARTIST = "artists"
 
string SONOS_CHECK_ACTIVITY = "sonos_check_activity"
 
string SONOS_COMPOSER = "composers"
 
string SONOS_CREATE_ALARM = "sonos_create_alarm"
 
string SONOS_CREATE_AUDIO_FORMAT_SENSOR = "sonos_create_audio_format_sensor"
 
string SONOS_CREATE_BATTERY = "sonos_create_battery"
 
string SONOS_CREATE_FAVORITES_SENSOR = "sonos_create_favorites_sensor"
 
string SONOS_CREATE_LEVELS = "sonos_create_levels"
 
string SONOS_CREATE_MEDIA_PLAYER = "sonos_create_media_player"
 
string SONOS_CREATE_MIC_SENSOR = "sonos_create_mic_sensor"
 
string SONOS_CREATE_SWITCHES = "sonos_create_switches"
 
string SONOS_FALLBACK_POLL = "sonos_fallback_poll"
 
string SONOS_FAVORITES_UPDATED = "sonos_favorites_updated"
 
string SONOS_GENRE = "genres"
 
string SONOS_MEDIA_UPDATED = "sonos_media_updated"
 
string SONOS_OTHER_ITEM = "other items"
 
string SONOS_PLAYLISTS = "playlists"
 
string SONOS_RADIO = "radio"
 
string SONOS_REBOOTED = "sonos_rebooted"
 
string SONOS_SPEAKER_ACTIVITY = "sonos_speaker_activity"
 
string SONOS_SPEAKER_ADDED = "sonos_speaker_added"
 
string SONOS_STATE_PLAYING = "PLAYING"
 
string SONOS_STATE_TRANSITIONING = "TRANSITIONING"
 
string SONOS_STATE_UPDATED = "sonos_state_updated"
 
dictionary SONOS_TO_MEDIA_CLASSES
 
dictionary SONOS_TO_MEDIA_TYPES
 
string SONOS_TRACKS = "tracks"
 
dictionary SONOS_TYPES_MAPPING
 
string SONOS_VANISHED = "sonos_vanished"
 
string SOURCE_AIRPLAY = "AirPlay"
 
string SOURCE_LINEIN = "Line-in"
 
string SOURCE_SPOTIFY_CONNECT = "Spotify Connect"
 
string SOURCE_TV = "TV"
 
string SUB_FAIL_ISSUE_ID = "subscriptions_failed"
 
string SUB_FAIL_URL = "https://www.home-assistant.io/integrations/sonos/#network-requirements"
 
int SUBSCRIPTION_TIMEOUT = 1200
 
string UPNP_ST = "urn:schemas-upnp-org:device:ZonePlayer:1"
 

Detailed Description

Const for Sonos.

Variable Documentation

◆ AVAILABILITY_CHECK_INTERVAL

homeassistant.components.sonos.const.AVAILABILITY_CHECK_INTERVAL = datetime.timedelta(minutes=1)

Definition at line 176 of file const.py.

◆ AVAILABILITY_TIMEOUT

float homeassistant.components.sonos.const.AVAILABILITY_TIMEOUT = AVAILABILITY_CHECK_INTERVAL.total_seconds() * 4.5

Definition at line 177 of file const.py.

◆ BATTERY_SCAN_INTERVAL

homeassistant.components.sonos.const.BATTERY_SCAN_INTERVAL = datetime.timedelta(minutes=15)

Definition at line 178 of file const.py.

◆ DATA_SONOS

string homeassistant.components.sonos.const.DATA_SONOS = "sonos_media_player"

Definition at line 13 of file const.py.

◆ DATA_SONOS_DISCOVERY_MANAGER

string homeassistant.components.sonos.const.DATA_SONOS_DISCOVERY_MANAGER = "sonos_discovery_manager"

Definition at line 14 of file const.py.

◆ DISCOVERY_INTERVAL

homeassistant.components.sonos.const.DISCOVERY_INTERVAL = datetime.timedelta(seconds=60)

Definition at line 180 of file const.py.

◆ DOMAIN

string homeassistant.components.sonos.const.DOMAIN = "sonos"

Definition at line 12 of file const.py.

◆ EXPANDABLE_MEDIA_TYPES

list homeassistant.components.sonos.const.EXPANDABLE_MEDIA_TYPES
Initial value:
1 = [
2  MediaType.ALBUM,
3  MediaType.ARTIST,
4  MediaType.COMPOSER,
5  MediaType.GENRE,
6  MediaType.PLAYLIST,
7  SONOS_ALBUM,
8  SONOS_ALBUM_ARTIST,
9  SONOS_ARTIST,
10  SONOS_GENRE,
11  SONOS_COMPOSER,
12  SONOS_PLAYLISTS,
13 ]

Definition at line 39 of file const.py.

◆ LIBRARY_TITLES_MAPPING

dictionary homeassistant.components.sonos.const.LIBRARY_TITLES_MAPPING
Initial value:
1 = {
2  "A:ALBUM": "Albums",
3  "A:ALBUMARTIST": "Artists",
4  "A:ARTIST": "Contributing Artists",
5  "A:COMPOSER": "Composers",
6  "A:GENRE": "Genres",
7  "A:PLAYLISTS": "Playlists",
8  "A:TRACKS": "Tracks",
9 }

Definition at line 118 of file const.py.

◆ MODELS_LINEIN_AND_TV

tuple homeassistant.components.sonos.const.MODELS_LINEIN_AND_TV = ("AMP",)

Definition at line 174 of file const.py.

◆ MODELS_LINEIN_ONLY

tuple homeassistant.components.sonos.const.MODELS_LINEIN_ONLY
Initial value:
1 = (
2  "CONNECT",
3  "CONNECT:AMP",
4  "PORT",
5  "PLAY:5",
6 )

Definition at line 162 of file const.py.

◆ MODELS_TV_ONLY

tuple homeassistant.components.sonos.const.MODELS_TV_ONLY
Initial value:
1 = (
2  "ARC",
3  "BEAM",
4  "PLAYBAR",
5  "PLAYBASE",
6 )

Definition at line 168 of file const.py.

◆ PLATFORMS

list homeassistant.components.sonos.const.PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.MEDIA_PLAYER,
4  Platform.NUMBER,
5  Platform.SENSOR,
6  Platform.SWITCH,
7 ]

Definition at line 15 of file const.py.

◆ PLAYABLE_MEDIA_TYPES

list homeassistant.components.sonos.const.PLAYABLE_MEDIA_TYPES
Initial value:
1 = [
2  MediaType.ALBUM,
3  MediaType.ARTIST,
4  MediaType.COMPOSER,
5  MediaType.CONTRIBUTING_ARTIST,
6  MediaType.GENRE,
7  MediaType.PLAYLIST,
8  MediaType.TRACK,
9 ]

Definition at line 128 of file const.py.

◆ SCAN_INTERVAL

homeassistant.components.sonos.const.SCAN_INTERVAL = datetime.timedelta(seconds=10)

Definition at line 179 of file const.py.

◆ SONOS_ALARMS_UPDATED

string homeassistant.components.sonos.const.SONOS_ALARMS_UPDATED = "sonos_alarms_updated"

Definition at line 148 of file const.py.

◆ SONOS_ALBUM

string homeassistant.components.sonos.const.SONOS_ALBUM = "albums"

Definition at line 27 of file const.py.

◆ SONOS_ALBUM_ARTIST

string homeassistant.components.sonos.const.SONOS_ALBUM_ARTIST = "album_artists"

Definition at line 30 of file const.py.

◆ SONOS_ARTIST

string homeassistant.components.sonos.const.SONOS_ARTIST = "artists"

Definition at line 26 of file const.py.

◆ SONOS_CHECK_ACTIVITY

string homeassistant.components.sonos.const.SONOS_CHECK_ACTIVITY = "sonos_check_activity"

Definition at line 138 of file const.py.

◆ SONOS_COMPOSER

string homeassistant.components.sonos.const.SONOS_COMPOSER = "composers"

Definition at line 32 of file const.py.

◆ SONOS_CREATE_ALARM

string homeassistant.components.sonos.const.SONOS_CREATE_ALARM = "sonos_create_alarm"

Definition at line 139 of file const.py.

◆ SONOS_CREATE_AUDIO_FORMAT_SENSOR

string homeassistant.components.sonos.const.SONOS_CREATE_AUDIO_FORMAT_SENSOR = "sonos_create_audio_format_sensor"

Definition at line 140 of file const.py.

◆ SONOS_CREATE_BATTERY

string homeassistant.components.sonos.const.SONOS_CREATE_BATTERY = "sonos_create_battery"

Definition at line 141 of file const.py.

◆ SONOS_CREATE_FAVORITES_SENSOR

string homeassistant.components.sonos.const.SONOS_CREATE_FAVORITES_SENSOR = "sonos_create_favorites_sensor"

Definition at line 142 of file const.py.

◆ SONOS_CREATE_LEVELS

string homeassistant.components.sonos.const.SONOS_CREATE_LEVELS = "sonos_create_levels"

Definition at line 145 of file const.py.

◆ SONOS_CREATE_MEDIA_PLAYER

string homeassistant.components.sonos.const.SONOS_CREATE_MEDIA_PLAYER = "sonos_create_media_player"

Definition at line 146 of file const.py.

◆ SONOS_CREATE_MIC_SENSOR

string homeassistant.components.sonos.const.SONOS_CREATE_MIC_SENSOR = "sonos_create_mic_sensor"

Definition at line 143 of file const.py.

◆ SONOS_CREATE_SWITCHES

string homeassistant.components.sonos.const.SONOS_CREATE_SWITCHES = "sonos_create_switches"

Definition at line 144 of file const.py.

◆ SONOS_FALLBACK_POLL

string homeassistant.components.sonos.const.SONOS_FALLBACK_POLL = "sonos_fallback_poll"

Definition at line 147 of file const.py.

◆ SONOS_FAVORITES_UPDATED

string homeassistant.components.sonos.const.SONOS_FAVORITES_UPDATED = "sonos_favorites_updated"

Definition at line 149 of file const.py.

◆ SONOS_GENRE

string homeassistant.components.sonos.const.SONOS_GENRE = "genres"

Definition at line 29 of file const.py.

◆ SONOS_MEDIA_UPDATED

string homeassistant.components.sonos.const.SONOS_MEDIA_UPDATED = "sonos_media_updated"

Definition at line 150 of file const.py.

◆ SONOS_OTHER_ITEM

string homeassistant.components.sonos.const.SONOS_OTHER_ITEM = "other items"

Definition at line 34 of file const.py.

◆ SONOS_PLAYLISTS

string homeassistant.components.sonos.const.SONOS_PLAYLISTS = "playlists"

Definition at line 28 of file const.py.

◆ SONOS_RADIO

string homeassistant.components.sonos.const.SONOS_RADIO = "radio"

Definition at line 33 of file const.py.

◆ SONOS_REBOOTED

string homeassistant.components.sonos.const.SONOS_REBOOTED = "sonos_rebooted"

Definition at line 154 of file const.py.

◆ SONOS_SPEAKER_ACTIVITY

string homeassistant.components.sonos.const.SONOS_SPEAKER_ACTIVITY = "sonos_speaker_activity"

Definition at line 151 of file const.py.

◆ SONOS_SPEAKER_ADDED

string homeassistant.components.sonos.const.SONOS_SPEAKER_ADDED = "sonos_speaker_added"

Definition at line 152 of file const.py.

◆ SONOS_STATE_PLAYING

string homeassistant.components.sonos.const.SONOS_STATE_PLAYING = "PLAYING"

Definition at line 36 of file const.py.

◆ SONOS_STATE_TRANSITIONING

string homeassistant.components.sonos.const.SONOS_STATE_TRANSITIONING = "TRANSITIONING"

Definition at line 37 of file const.py.

◆ SONOS_STATE_UPDATED

string homeassistant.components.sonos.const.SONOS_STATE_UPDATED = "sonos_state_updated"

Definition at line 153 of file const.py.

◆ SONOS_TO_MEDIA_CLASSES

dictionary homeassistant.components.sonos.const.SONOS_TO_MEDIA_CLASSES
Initial value:
1 = {
2  SONOS_ALBUM: MediaClass.ALBUM,
3  SONOS_ALBUM_ARTIST: MediaClass.ARTIST,
4  SONOS_ARTIST: MediaClass.CONTRIBUTING_ARTIST,
5  SONOS_COMPOSER: MediaClass.COMPOSER,
6  SONOS_GENRE: MediaClass.GENRE,
7  SONOS_PLAYLISTS: MediaClass.PLAYLIST,
8  SONOS_TRACKS: MediaClass.TRACK,
9  "object.container.album.musicAlbum": MediaClass.ALBUM,
10  "object.container.genre.musicGenre": MediaClass.PLAYLIST,
11  "object.container.person.composer": MediaClass.PLAYLIST,
12  "object.container.person.musicArtist": MediaClass.ARTIST,
13  "object.container.playlistContainer.sameArtist": MediaClass.ARTIST,
14  "object.container.playlistContainer": MediaClass.PLAYLIST,
15  "object.item": MediaClass.TRACK,
16  "object.item.audioItem.musicTrack": MediaClass.TRACK,
17  "object.item.audioItem.audioBroadcast": MediaClass.GENRE,
18 }

Definition at line 53 of file const.py.

◆ SONOS_TO_MEDIA_TYPES

dictionary homeassistant.components.sonos.const.SONOS_TO_MEDIA_TYPES
Initial value:
1 = {
2  SONOS_ALBUM: MediaType.ALBUM,
3  SONOS_ALBUM_ARTIST: MediaType.ARTIST,
4  SONOS_ARTIST: MediaType.CONTRIBUTING_ARTIST,
5  SONOS_COMPOSER: MediaType.COMPOSER,
6  SONOS_GENRE: MediaType.GENRE,
7  SONOS_PLAYLISTS: MediaType.PLAYLIST,
8  SONOS_TRACKS: MediaType.TRACK,
9  "object.container.album.musicAlbum": MediaType.ALBUM,
10  "object.container.genre.musicGenre": MediaType.PLAYLIST,
11  "object.container.person.composer": MediaType.PLAYLIST,
12  "object.container.person.musicArtist": MediaType.ARTIST,
13  "object.container.playlistContainer.sameArtist": MediaType.ARTIST,
14  "object.container.playlistContainer": MediaType.PLAYLIST,
15  "object.item.audioItem.musicTrack": MediaType.TRACK,
16 }

Definition at line 72 of file const.py.

◆ SONOS_TRACKS

string homeassistant.components.sonos.const.SONOS_TRACKS = "tracks"

Definition at line 31 of file const.py.

◆ SONOS_TYPES_MAPPING

dictionary homeassistant.components.sonos.const.SONOS_TYPES_MAPPING
Initial value:
1 = {
2  "A:ALBUM": SONOS_ALBUM,
3  "A:ALBUMARTIST": SONOS_ALBUM_ARTIST,
4  "A:ARTIST": SONOS_ARTIST,
5  "A:COMPOSER": SONOS_COMPOSER,
6  "A:GENRE": SONOS_GENRE,
7  "A:PLAYLISTS": SONOS_PLAYLISTS,
8  "A:TRACKS": SONOS_TRACKS,
9  "object.container.album.musicAlbum": SONOS_ALBUM,
10  "object.container.genre.musicGenre": SONOS_GENRE,
11  "object.container.person.composer": SONOS_COMPOSER,
12  "object.container.person.musicArtist": SONOS_ALBUM_ARTIST,
13  "object.container.playlistContainer.sameArtist": SONOS_ARTIST,
14  "object.container.playlistContainer": SONOS_PLAYLISTS,
15  "object.item": SONOS_OTHER_ITEM,
16  "object.item.audioItem.musicTrack": SONOS_TRACKS,
17  "object.item.audioItem.audioBroadcast": SONOS_RADIO,
18 }

Definition at line 99 of file const.py.

◆ SONOS_VANISHED

string homeassistant.components.sonos.const.SONOS_VANISHED = "sonos_vanished"

Definition at line 155 of file const.py.

◆ SOURCE_AIRPLAY

string homeassistant.components.sonos.const.SOURCE_AIRPLAY = "AirPlay"

Definition at line 157 of file const.py.

◆ SOURCE_LINEIN

string homeassistant.components.sonos.const.SOURCE_LINEIN = "Line-in"

Definition at line 158 of file const.py.

◆ SOURCE_SPOTIFY_CONNECT

string homeassistant.components.sonos.const.SOURCE_SPOTIFY_CONNECT = "Spotify Connect"

Definition at line 159 of file const.py.

◆ SOURCE_TV

string homeassistant.components.sonos.const.SOURCE_TV = "TV"

Definition at line 160 of file const.py.

◆ SUB_FAIL_ISSUE_ID

string homeassistant.components.sonos.const.SUB_FAIL_ISSUE_ID = "subscriptions_failed"

Definition at line 23 of file const.py.

◆ SUB_FAIL_URL

string homeassistant.components.sonos.const.SUB_FAIL_URL = "https://www.home-assistant.io/integrations/sonos/#network-requirements"

Definition at line 24 of file const.py.

◆ SUBSCRIPTION_TIMEOUT

int homeassistant.components.sonos.const.SUBSCRIPTION_TIMEOUT = 1200

Definition at line 181 of file const.py.

◆ UPNP_ST

string homeassistant.components.sonos.const.UPNP_ST = "urn:schemas-upnp-org:device:ZonePlayer:1"

Definition at line 10 of file const.py.