SHARE
TWEET

Untitled

a guest Mar 13th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         var window1:Device = DeviceManager.instance.findDevice("window-1");
  2.         var window2:Device = DeviceManager.instance.findDevice("window-2");
  3.         var lightSensor1:Device = DeviceManager.instance.findDevice("light-sensor-1");
  4.  
  5.         var light1:Device = DeviceManager.instance.findDevice("light-1");
  6.         var light2:Device = DeviceManager.instance.findDevice("light-2");
  7.         var humidityDispenser1:Device = DeviceManager.instance.findDevice("humidity-dispenser-1");
  8.        
  9.         if (window1.state == true && window2.state == true && lightSensor1.state > 60) {
  10.             trace("TUNR ON THE LIGHTS!!");
  11.             light1.state = true;
  12.             light2.state = true;
  13.             humidityDispenser1.state = lightSensor1.state / 2;
  14.         } else {
  15.             trace("TUNR OFF THE LIGHTS!!");
  16.             light1.state = false;
  17.             light2.state = false;
  18.             humidityDispenser1.state = 10;
  19.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top