Function devices.system.SetOut(): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:function devices.system.SetOut()}} | {{DISPLAYTITLE:function devices.system.SetOut()}} | ||
Changes the state (on or off) of the outlet. | Changes the state (on or off) of the outlet. | ||
<i>nil</i> devices.system.SetOut{< | <i>nil</i> devices.system.SetOut{<code>config</code>} | ||
=== Parameters === | === Parameters === | ||
<i>table</i> < | <i>table</i> <tt>config</tt> | ||
* <i>number</i> < | * <i>number</i> <code>output</code> outlet to change (1 to 4) | ||
* <i>boolean</i> < | * <i>boolean</i> <code>value</code> true = turn on, false = turn off | ||
=== Return value === | === Return value === | ||
Revision as of 18:22, 18 April 2017
Changes the state (on or off) of the outlet.
nil devices.system.SetOut{config}
Parameters
table config
- number
outputoutlet to change (1 to 4) - boolean
valuetrue = 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