This is probably easy. I am using UI7 and have a scene that I want to run only at night (when I open my front doors, turn the hallway lights on, wait a minute and turn off).
return luup.is_night()
does the job. I know how the command work. If it is night, return true. Now, where does this code go? When I make the scene does this go under “Also, execute the following Luup code:” or somewhere else? Does this even work anymore?
Before a scene executes the commands (Actions) for the scene … it runs any LUA code for the scene.,
If that code does not exist or it returns true or nothing .,. than the actions are run.
If that code exists AND it returns false then the actions are NOT run,