Function devices.system.SetOut(): Difference between revisions
Jump to navigation
Jump to search
| Line 6: | Line 6: | ||
<i>table</i> config{<code>output</code>, <code>value</code>} | <i>table</i> config{<code>output</code>, <code>value</code>} | ||
* <i>number</i> <code>output</code> outlet to change (1 to 4) | * <i>number</i> <code>output</code> outlet to change (1 to 4) | ||
* <i>boolean</i> <code>value</code> true = turn on | * <i>boolean</i> <code>value</code> | ||
** <tt>true</tt> = turn on | |||
** <tt>false</tt> = turn off | |||
=== Return value === | === Return value === | ||
Revision as of 20:48, 19 April 2017
Changes the state (on or off) of the outlet.
nil devices.system.SetOut(config)
Parameters
table config{output, value}
- number
outputoutlet to change (1 to 4) - boolean
value- true = turn on
- false = turn off
Return value
nil
Usage
-- turns outlet No.1 on
devices.system.SetOut{output=1,value=true}
See also
- devices.system.ResetOut() to conveniently reset the state