spotifywebapipython.models.spotifyconnectdevice

@export
class SpotifyConnectDevice:

Spotify Connect Device object.

Information about the Spotify Connect device, which is a combination of the ZeroconfDiscoveryResult and ZeroconfGetInfo classes.

SpotifyConnectDevice()

Initializes a new instance of the class.

DeviceIdActivated: str

Google Cast device id value (e.g. "30fbc80e35598f3c242f2120413c943dfd9715fe") that was activated by the Spotify Cast App;
Otherwise, None if the device has not been activated yet.

This value can be different from the Id value for cast groups that send connect commands to the group coordinator instead of the group itself.

It is only populated by Google Cast processing; Spotify Connect Zeroconf does not populate this property.

Information about the Zeroconf entry for a SpotifyConnect device as found by Zeroconf (mDNS).

Spotify Zeroconf API GetInfo response object.

Id: str

Spotify Connect device id value (e.g. "30fbc80e35598f3c242f2120413c943dfd9715fe").

IsActiveDevice: bool

Returns True if this device is the currently active Spotify Web API player device; otherwise, False.

IsAmazonDevice: bool

True if the device is an Amazon device; otherwise, False.

IsChromeCast: bool

True if the device is a Google ChromeCast device; otherwise, False.

IsInDeviceList: bool

Returns True if this device is a member of the Spotify Web API player device list; otherwise, False.

IsRestricted: bool

Returns True if this device is a member of the Spotify Web API player device list; otherwise, False.

IsSonos: bool

True if the device is a Sonos device; otherwise, False.

Name: str

Spotify Connect device name value (e.g. "Bose-ST10-1").

Title: str

Spotify Connect device name and id value (e.g. "Bose-ST10-1" (30fbc80e35598f3c242f2120413c943dfd9715fe)).

WasReConnected: bool

True if the device was re-connected, after being inactive or disconnected.

Spotify Zeroconf API Zeroconf response object.

def Equals(self, obj) -> bool:

Returns true if the specified object instance contains the same argument values as our object instance values; otherwise, False.

Arguments:
  • obj (SpotifyConnectDevice): Object instance to compare.
def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeTitle: bool = True) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeTitle (str): True to include the class name title prefix.