Skip to content

tiledash.call

Does an action the widget may do (its Permissions), with the same arguments as in a template’s handler, on the tile’s own device and what its settings picked. Only right after a press inside the tile. Returns a promise that fails with the reason when it is refused.

Syntax

tiledash.call(action, …args)

Arguments

actionRequired
One of `toggle`, `set`, `increment`, `startFlow`, `setMood`, `openHistory`, `openDevice`, `openCamera`, `openDashboard`, `confirm`, `toast`.
argsOptional
What the action takes.

Example

button.addEventListener('click', () => {  tiledash.call('toggle', 'onoff').catch((error) => console.warn(error.message));});