Difference between revisions of "String devices.system.output1 state"

From wiki.netio-products.com
Jump to navigation Jump to search
(Založena nová stránka s textem „{{DISPLAYTITLE:String devices.system.output1_state}} Returns the state of corresponding outlet state of outlet 1: string devices.system.output1_state stat…“)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:String devices.system.output1_state}}
+
{{DISPLAYTITLE:string devices.system.output1_state}}
Returns the state of corresponding outlet
+
Returns the state of corresponding outlet. <b>The property is read only!</b> To change the state, use [[Function devices.system.SetOut()|devices.system.SetOut()]].
state of outlet 1:
+
 
string devices.system.output1_state
+
 
state of outlet 2:
+
<b>state of outlet 1</b><br><i>string</i> <code>devices.system.output1_state</code>
string devices.system.output2_state
+
 
state of outlet 3:
+
 
string devices.system.output3_state
+
<b>state of outlet 2</b><br><i>string</i> <code>devices.system.output2_state</code>
state of outlet 4:
+
 
string devices.system.output4_state
+
 
 +
<b>state of outlet 3</b><br><i>string</i> <code>devices.system.output3_state</code>
 +
 
 +
 
 +
<b>state of outlet 4</b><br><i>string</i> <code>devices.system.output4_state</code>
 +
 
  
 
=== Value ===
 
=== Value ===
Line 24: Line 29:
 
   log("Outlet 1 is off")
 
   log("Outlet 1 is off")
 
  end
 
  end
 +
 +
=== See also ===
 +
* [[Function devices.system.SetOut()|devices.system.SetOut()]] to change the state of the outlet

Latest revision as of 19:31, 18 April 2017

Returns the state of corresponding outlet. The property is read only! To change the state, use devices.system.SetOut().


state of outlet 1
string devices.system.output1_state


state of outlet 2
string devices.system.output2_state


state of outlet 3
string devices.system.output3_state


state of outlet 4
string devices.system.output4_state


Value

  • "on" when the outlet is on
  • "off" when the outlet is off

warning the value is not boolean!

if devices.system.output1_state==true then ...

The above condition always fails!

Usage

if devices.system.output1_state=="on" then
  log("Outlet 1 is on")
else
  log("Outlet 1 is off")
end

See also