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

Variables

string DOMAIN = "spotify"
 
 LOGGER = logging.getLogger(__package__)
 
string MEDIA_PLAYER_PREFIX = "spotify://"
 
string MEDIA_TYPE_SHOW = "show"
 
list PLAYABLE_MEDIA_TYPES
 
list SPOTIFY_SCOPES
 

Detailed Description

Define constants for the Spotify integration.

Variable Documentation

◆ DOMAIN

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

Definition at line 7 of file const.py.

◆ LOGGER

homeassistant.components.spotify.const.LOGGER = logging.getLogger(__package__)

Definition at line 9 of file const.py.

◆ MEDIA_PLAYER_PREFIX

string homeassistant.components.spotify.const.MEDIA_PLAYER_PREFIX = "spotify://"

Definition at line 28 of file const.py.

◆ MEDIA_TYPE_SHOW

string homeassistant.components.spotify.const.MEDIA_TYPE_SHOW = "show"

Definition at line 29 of file const.py.

◆ PLAYABLE_MEDIA_TYPES

list homeassistant.components.spotify.const.PLAYABLE_MEDIA_TYPES
Initial value:
1 = [
2  MediaType.PLAYLIST,
3  MediaType.ALBUM,
4  MediaType.ARTIST,
5  MediaType.EPISODE,
6  MEDIA_TYPE_SHOW,
7  MediaType.TRACK,
8 ]

Definition at line 31 of file const.py.

◆ SPOTIFY_SCOPES

list homeassistant.components.spotify.const.SPOTIFY_SCOPES
Initial value:
1 = [
2  # Needed to be able to control playback
3  "user-modify-playback-state",
4  # Needed in order to read available devices
5  "user-read-playback-state",
6  # Needed to determine if the user has Spotify Premium
7  "user-read-private",
8  # Needed for media browsing
9  "playlist-read-private",
10  "playlist-read-collaborative",
11  "user-library-read",
12  "user-top-read",
13  "user-read-playback-position",
14  "user-read-recently-played",
15  "user-follow-read",
16 ]

Definition at line 11 of file const.py.