I have my alarm panel connected (Vista).
I have exterior cameras.
I have the day or night app.
I have a scene that turns on all exterior lights
I want to trigger the exterior light scene when the alarm is tripped ONLY if it is nighttime. I know how to do it based on one variable(day/night OR alarm), but I don’t know how to do it with 2 variables.
I use the “combination switch” plugin for something similar. It is a virtual switch that lets you define input conditions based on the state of other switches or devices. When a specified number of those conditions have been met, the switch turns on (you can use that to trigger a scene). Not sure if it works with the night or day plugin.
if luup.is_night() then
return true
else
return false
end
Is:
return luup.is_night()
But I also recommend PLEG … Using the Day or Night plugin allows you to test your logic as well as bias what you consider day or night to be darker or lighter.