User Tools

Site Tools


Sidebar

dictionary:unitcontrol:toggle

Toggle

Toggles the current state of the unit, if it's off it turns on and if it's on it turns off.

Usage:

toggle “electric door latch”

Optional Parameters:

in (integer, creates a scheduled event to perform the toggle this many seconds in the future.)
at (date, like the in parameter, an applescript date when you wish the toggle to occurr.)

for (integer, creates a scheduled event to toggle the unit again in this many seconds.)
until (date, like the for parameter, an applescript date when you wish the toggle to return to the current state.)

rate (integer, if supported by the device this ramp rate will be included with the command.)

with no script (performs the toggle but wont run the ON script)
with no transmit (updates the database and runs the script but doesn't actually transmit the command)

Examples:

--activate the door latch for 10 seconds
toggle "electric door latch" for 10
--Flash a light 3 times and return to previous state
repeat 6 times
  toggle "Overhead"
end repeat

Notes:

The command will do nothing if the unit is Blocked.

dictionary/unitcontrol/toggle.txt · Last modified: 2016/03/14 15:42 (external edit)