statusstatus
Arc standard library reference for the status module
The status module publishes status notifications (alarms, warnings, and operational
states) to the Core.
set
Sets a status notification (an alarm, warning, or operational state) on the Core, addressing it by name or by key, and outputs the resolved status key.
status.set{key_or_name: str, message: str, variant: str} -> strParameters
key_or_name: An existing status key or name. If no status matches, a new one is created.message: The message body shown on the status.variant: One ofsuccess,info,warning,error,loading, ordisabled.
Output
The resolved status key that was set.
If several statuses share a name, the first match is updated. If a status.set fails
(for example, an empty key_or_name or a database error), it reports a warning and
the automation keeps running.
Flow
Func
stage main {
status.set{
key_or_name = "ox_alarm",
message = "Overpressure detected",
variant = "error",
} -> status_key
}func raise_alarm() {
status_key = status.set(
"ox_alarm",
"Overpressure detected",
"error"
)
}