I use a HSM100 which has a light sensor in it for tripping lights only when its dark. You can setup scenes to only work at sunset and sunrise, however if code is the only way try the following link, which also has other helpful code snippets
Thanks Ap15e and m0jon… the part where I’m stuck is how to use the code. Is it as simple as pasting it inside the Luup text box within a scene? Will the other commands, events, timers etc remain as is and this code supplements the other actions? Is there a short paragraph any where that describes how to use the code within Vera?