Switches a yes/no capability to the other value: on becomes off, off becomes on. A yes/no capability that can be changed, of the tile’s device or of the device given.
Takes
What it is
capabilityrequired
A capability id of that device, quoted: 'onoff', 'evcharger_charging'.
deviceId
A device: a setting’s settings.<name>.id. Left out, the tile’s own device.
Sets a capability: true or false, a number within its min and max (snapped to its step), or one of an enum’s ids. A capability that can be changed, of the tile’s device or of the device given.
Takes
What it is
capabilityrequired
A capability id of that device, quoted: 'onoff', 'evcharger_charging'.
valuerequired
What to set it to.
deviceId
A device: a setting’s settings.<name>.id. Left out, the tile’s own device.
Opens a capability’s history in a dialog; the range is picked there and starts at 24 hours. A capability the device has (it doesn’t have to be changeable).
Takes
What it is
capabilityrequired
A capability id of that device, quoted: 'onoff', 'evcharger_charging'.
range
Ignored for now: the dialog starts at 24 hours.
deviceId
A device: a setting’s settings.<name>.id. Left out, the tile’s own device.
Keeps a value in state.<key> for this tile on this screen and draws the widget again; it is remembered there after a reload. With forMs it goes back to null after that long, and isn’t remembered. Nothing outside the widget. At most 32 keys; forMs from 100 to 60000.
Takes
What it is
keyrequired
A name: letters, digits and _, starting with a letter.
valuerequired
Text, a number, true, false or null.
forMs
Optional: milliseconds until it goes back to null.
Runs what the tile’s user chose for a tap setting (or its default), as tapping a part marked with it does: for a handler of your own that taps through to it, like the map’s plain tap. A tap setting of this widget; its choice goes through the same checks as any action.