Watch Onoff
Attributes
Common
ID
Sets the object's ID.
The ID identifies the object and is used to reference it in UISet actions, allowing to change its attributes dynamically.
The ID is not unique, it can be shared among multiple objects to quickly change a common attribute.
IDs can't be changed with a UISet action, but they can have a Value Binding assigned to them. Value Bindings on IDs allow an object to be dinamically attached to a set of attribute values.
E.g. the following Value Binding switches the ID of the object between mybutton1
and mybutton2
based on the value of the UISet button.address
:
Value binding:
="mybutton" + ui('button', 'address')
UISet:
UISet('button', 'address', '1')
switches the ID to mybutton1
UISet('button', 'address', '2')
switches the ID to mybutton2
Label
Specifies the label.
Attribute Values
Value | Description |
---|---|
<string> | Label text. |
Action
Specifies the action performed when tapped.
The default
value is: user
.
Attribute Values
Value | Description |
---|---|
user | Default value. Sends a command to the server, with the specified name and parameter. |
device | Toggles a datapoint. |
Name
Specifies the name of the command.