How controls send commands to the server.
Definition
"action": {
"method": "meshsocket",
"mode": "request",
"event": "set_power",
"payload": { "state": "{{value}}" }
}
Modes
| Mode | Behavior |
|---|---|
request |
Send + await response |
broadcast |
Fire and forget |
Substitution
{{value}} in any string becomes the current control value:
- Toggle: "true" / "false"
- Slider: "75.0"
- Picker: "Ocean"
Related
- Control Definition — every control can have an action
- Long Press — alternate action on long press