bosesoundtouchapi.models.zone
SoundTouch device Zone configuration object.
This class contains the attributes and sub-items that represent a multiroom zone configuration of the device.
Initializes a new instance of the class.
Arguments:
- masterDeviceId (str): Master device identifier for this zone.
- masterIpAddress (str): Master device ipv4 address.
- isZoneMaster (bool): True if this zone object is a zone master; otherwise, False.
- members (list): List of
ZoneMember
objects that are under the control of this zone. - root (Element): xmltree Element item to load arguments from.
If specified, then other passed arguments are ignored.
Raises:
- SoundTouchWarning: If any zone member specified by the members argument is not a
ZoneMember
object, or if a device id was not supplied for each member.
Master device identifier for this zone.
If a device is the master, the first ZoneMember
object will describe itself.
If a device is a group member, the master will not be described in a member.
You can determine if a device is the master or not by comparing its MAC Address to master.
The list of ZoneMember
objects that are (or will be) members of this Zone.
Add a new member to the list of members for this zone.
Arguments:
- member: The
ZoneMember
object to append. - logsi: A SmartInspect logging session, used to log exception messages.
Raises:
- SoundTouchError: Member to be added is not a ZoneMember object. Member to be added did not specify a DeviceId. Member DeviceId to be added or removed cannot be the master DeviceId.
The master SoundTouch device cannot find members without their device id. This method will validate each member in the list to ensure that a device id was supplied.
Returns an xmltree Element node representation of the class.
Arguments:
- isRequestBody (bool): True if the element should only return attributes needed for a POST request body; otherwise, False to return all attributes.
Returns a displayable string representation of the class.
Arguments:
- includeItems (bool): True to include all items in the list; otherwise False to only include the base list.