Skip to content
Stand with Ukraine flag

Manual Override Control with Automatic Return

  • Widget
  • 13 installs
  • v1.0.0
  • Aug 28, 2026
  • MIT license
  • v4.2+
Manual Override Control with Automatic Return

Takes an automated value off its schedule for a chosen time, shows who did it and when it returns, and hands it back with one click.

Widget Type
  • Control
Category
  • Controls
Use Cases
  • Smart Building
  • Smart Farming
  • Smart City

The deadline is a comparison your automation makes, not a timer this card runs — so an override left behind by a crash or a closed browser stops counting the moment it expires, with nothing to sweep and nothing to remember across a restart.

Who it’s for

A building operator whose guest turned the lobby up, a grower who needs a compartment held while they work in it, a street-lighting crew who need a segment on now and back on programme afterwards — all three ask the same question of the same value: is this coming from the automation or from a person, and when does it go back? The card is deliberately indifferent to what the value is, so the same one sits above a temperature setpoint, an irrigation pump, a damper or a lighting zone.

What it does

A lobby setpoint following its schedule at 21.5 °C is taken to manual for two hours at 16:21. The card writes controlMode: manual and overrideUntil two hours ahead, shows Overridden by A. Zaiko, counts down returns to automatic in 1 h 58 min · 18:21, and at 18:21 reads as automatic again without writing anything to make that true.

  • The time remaining in both forms. “in 47 min” and “18:00” answer different questions — one tells you whether to wait, the other tells you what to write on a work order.
  • The mode, the deadline and the value they govern, all read back. The card shows what is in force rather than what was last sent.
  • An override with no end, and never quietly. A commissioning engineer needs one, so the card offers it and then turns red and says it will not return on its own. That is the failure every operator describes: somebody took control in March and nobody noticed.
  • Who took control, printed beside the mode and written on whichever path the card is on — the attribute on one, a third RPC command on the other.
  • An override that survives an offline device. On the attribute path the pair is written to the platform rather than to the device: on server scope it never reaches the device at all, and on shared scope it arrives when the device next connects.
  • Governs the authority over a value; it does not set the value. Choosing the level, the setpoint or the mode is the job of the control widget beside it.

Two cards side by side: a lobby setpoint following its schedule at 21.5 degrees with four duration
buttons offered, and a greenhouse vent overridden by A. Zaiko and returning to automatic in 46 minutes
at 13:29, with a button to hand it back now

Requirements

An automation that reads the two keys before it writes. This card records an override; it does not enforce one. Where nothing consults controlMode and overrideUntil, the buttons work and the countdown runs while the value carries on following its schedule. A rule chain, a calculated field or your own service can be that reader — the filter is in How to set up.

How to set up

Data keys

The override card is a control widget and takes no datasource. Choose a target device in the widget configuration; everything below applies to that one entity.

AttributeScopeOperationDescription
controlMode (configurable name)Server or SharedRead + WriteCarries the value that means automatic or manual — auto and manual by default
overrideUntil (configurable name)Server or SharedRead + WriteEpoch milliseconds. 0 or absent means an override with no end
value (configurable name)Server or SharedReadThe reading shown on the face of the card. The card never writes it
overrideBy (configurable name)Server or SharedRead + WriteThe signed-in user’s name, written while Show who took control is on. On the RPC path the card reads it back here and sends the name as a command instead
MethodDirectionParametersSent when
setControlMode (configurable name)One-wayThe automatic or manual value, shaped by Payload function if one is writtenA duration button, or Return to automatic now, is pressed
setOverrideUntil (configurable name)One-wayThe deadline in epoch milliseconds, 0 for an override with no endThe same presses
setOverrideBy (configurable name)One-wayThe signed-in user’s name, and an empty string on the way back to automaticThe same presses, while Show who took control is on

With controlMode never written the card reads as automatic and every duration button stays enabled; the first press sets it. With the value key unbound or never reported, the card names the key it is waiting on rather than showing a bare dash. An overrideUntil in the past reads as automatic without the card writing anything.

Command

SettingDefaultEffect
ActionWrite a device attributeAttribute write or one-way RPC. The dialog shows one path at a time
Control-mode methodsetControlModeRPC handler carrying the mode
Override-until methodsetOverrideUntilRPC handler carrying the deadline
Override-by methodsetOverrideByRPC handler carrying the operator’s name, sent only while Show who took control is on
Payload functionemptyShapes the outgoing payload for a gateway. Left blank, each command carries its value bare
RPC timeout (ms)5000How long to wait before the command counts as failed
Queue the command for an offline deviceOffHolds the command until the device reconnects
Retries0Used only for a queued command

Attributes

SettingDefaultEffect
Control-mode keycontrolModeThe attribute your automation reads to decide who is in charge
Override-until keyoverrideUntilThe deadline your automation compares against the current time
Value that means automaticautoMatch a convention your deployment already writes
Value that means manualmanualThe same
Key of the value being governedvalueThe reading shown on the face of the card
Override-by keyoverrideByWhere the signed-in user’s name is written
Attribute scope to writeServerServer keeps the pair off the device and visible to a rule chain; shared delivers it to the device as well
Read the card’s state fromAttributeRead the keys from attributes, or from telemetry instead

Values

SettingDefaultEffect
Durations offered30 min, 2 h, 8 hOne button per row, in the order listed. A row with no minutes is dropped
Offer an override with no endOnAdds an “open” button. The card turns red and says it will not return on its own
Show who took controlOnRecords the signed-in user’s name alongside the mode, on both write paths
Caption above the value, Unit shown after the valueValue in force, emptyThe words above and after the reading
Label when mode ‘automatic’, Label when mode ‘overridden’Following the schedule, OverriddenWhat the card calls each mode
Stale after (minutes, 0 = off)0A device silent this long is marked stale and the card stops asserting the value

Teaching your automation to honour the override

Enrich the message with the originator’s server attributes controlMode and overrideUntil, then put this in a script filter ahead of the node that writes to the device:

var mode = metadata.ss_controlMode || 'auto';
var until = Number(metadata.ss_overrideUntil || 0);
var overridden = mode === 'manual' && (until === 0 || until > Date.now());
return !overridden;

True means the schedule may act. False means a person is in charge and the deadline has not passed.

Put that check in front of every write. The override is honoured by whatever reads the two keys, so the comparison has to sit where the write happens — in a rule chain, in a calculated field, or in your own service. Automation that writes on a timer without consulting the mode will keep writing, and the card will then be correctly reporting that a person is in charge while the value moves anyway.

How to customize

  • To offer different lengths — edit Durations offered. Each row is a number of minutes and a button label, and they are drawn in the order you list them.
  • To require an end time on every override — turn off Offer an override with no end.
  • To record who stepped inShow who took control writes the signed-in user’s name into the Override-by key and prints it beside the mode.
  • To reword the cardCaption above the value, Label when mode ‘automatic’ and Label when mode ‘overridden’ are the three phrases an operator reads first. A site that says “on programme” rather than “following the schedule” should say so.
  • To show a unit after the value — set Unit shown after the value.
  • To say when a reading has gone quiet — set Stale after (minutes, 0 = off). The card stops asserting the value, and taking control stays available, because the mode is still known.
  • To label the panel — set Title and Subtitle. Left empty, the subtitle names what a write lands on, whether that is a device or an asset, and the write path.
  • To match your dashboard’s palette — set Accent color and Keyboard focus outline color. The outline is drawn around a button reached with the Tab key, never on a mouse click, so a keyboard user can see which control has focus.
  • To keep the controls a fixed size — turn off Auto-scale controls to widget size.

Tips

  • Keep the pair on server scope when the thing honouring the override is a rule chain. The device then never sees two keys it has no use for, and the override still survives a device that is offline, because the write lands on the platform either way.

  • The card and your automation have to agree on the epoch. overrideUntil is milliseconds since 1970 UTC; a rule chain comparing it against a seconds-based clock releases every override immediately, and the card will keep counting down while the schedule writes over the top.

  • An override with no end is the one worth auditing. Either report on the overrideUntil = 0 case in your own tooling, or turn off Offer an override with no end on sites where nobody should be able to take control indefinitely.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.