Button Confirm
The ui-btn-confirm widget shows a full-width button with a label and an optional icon. The button has two states, normal and pressed. Each time the user activates it, the widget sends true (normal to pressed) or false (pressed to normal) and switches to the other state. The label, the icon and the confirmation text can differ between the two states.
When Confirmation text is set, pressing the button first opens a dialog titled with the current button label, with the confirmation text, a cancel button and a confirm button. Cancel, or the close button in the dialog header, closes it without sending anything. When Confirmation text is empty, the button sends at once in both states, even if On-Click Confirmation text is set.


Palette: category Utils, label button confirm. 1 input, 1 output.
Configuration
| Property | Description | Default |
|---|---|---|
| Name | Node name shown in the editor. | "" |
| Group | Dashboard group where the button is displayed. | (required) |
| Size | Widget width and height; 0 means automatic. | 0 x 0 |
| Label | Button text in the normal state. | "" |
| Icon (mdi) | Material Design icon shown before the text in the normal state, for example mdi-play. | "" |
| On-Click Label | Button text in the pressed state. When empty, Label is kept. | "" |
| On-Click Icon (mdi) | Icon in the pressed state, for example mdi-stop. When empty, Icon (mdi) is kept. | "" |
| Confirmation text | Dialog text in the normal state. When empty, no dialog is shown in either state. | "" |
| On-Click Confirmation text | Dialog text in the pressed state. When empty, Confirmation text is shown. | "" |
| Cancel button text | Text of the dialog button that closes it without sending. | CANCEL |
| Confirm button text | Text of the dialog button that confirms and sends. | CONFIRM |
Input
| Property | Type | Effect |
|---|---|---|
msg.payload.status | boolean | true puts the button in the pressed state, false in the normal state. Nothing is sent. |
msg.enabled | boolean | false greys the button out and ignores clicks; true enables it again. |
Both properties can come in the same message, and the change applies in every open dashboard. When a browser opens or reloads the page, the widget applies the payload.status and enabled of the last message stored for it.
A click changes the state only in the browser where it happened. To keep several dashboards in step with the real state, send payload.status back to the input (see the example).
Output
One message each time the user confirms, or presses the button when there is no dialog:
{ payload: true } // normal state -> pressed state
{ payload: false } // pressed state -> normal stateInput messages are not passed to the output.
Usage example
A start/stop button with confirmation in both states:
| Property | Value |
|---|---|
| Label | Start process |
| Icon (mdi) | mdi-play |
| Confirmation text | Start the process? |
| On-Click Label | Stop process |
| On-Click Icon (mdi) | mdi-stop |
| On-Click Confirmation text | Stop the process? |
Confirming "Start the process?" sends msg.payload = true and the button shows Stop process. Confirming "Stop the process?" sends false and the button shows Start process again.
When the process reports its state (msg.payload is true while it runs), a function node wired to the button input keeps every open dashboard showing it, and disables the button while the process is in an alarm state:
msg.enabled = !flow.get("alarm");
msg.payload = { status: msg.payload === true };
return msg;