bosesoundtouchapi.models.controllevelinfo
SoundTouch device generic Control Level Info configuration object.
This class contains the attributes and sub-items that represent a control value configuration for the device.
ControlLevelInfo( controlType: str = None, value: int = None, minValue: int = None, maxValue: int = None, step: int = None, root: xml.etree.ElementTree.Element = None)
Initializes a new instance of the class.
Arguments:
- controlType (str): Type of control the values represent (e.g. "bass", "treble", etc).
- value (int): The current value of the tone control.
- minValue (int): The minimum allowed value.
- maxValue (int): The maximum allowed value.
- step (int): The amount the value can increase or decrease at a time.
- root (Element): xmltree Element item to load arguments from.
If specified, then other passed arguments are ignored.
Raises:
- SoundTouchError: controlType argument was not of type str or was not supplied.
value argument was not of type int.
minValue argument was not of type int.
maxValue argument was not of type int.
step argument was not of type int.
def
ToElement(self, isRequestBody: bool = False) -> xml.etree.ElementTree.Element:
Overridden.
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.