Advertisements
20 Apr

Only run the scene at night

This is a very simple LUUP snippet. The Vera has a handy function .is_night() which, as you’d expect, simply returns true or false depending on if its day or night.

Vera doesn’t need an attached light sensor for this, instead it uses local weather data – so if you’ve opted to keep your Vera offline this will not work.

First create your scene based on your chosen trigger and add the lights you want turned on, or what ever actions you want it to do, then under Also, execute the following Luup code add the following.

This works because if your LUUP code returns true, which it will at night, the scene runs and if the return value is false it want.