Hold a preset time field in a variable


1) Give a description of the problem
Ideally, I would like to hold a time preset variable like @sunset in a local variable. I’m trying to hold all my scene definitions in arrays and then use some common code to set up and execute the scene. I have all of it covered except specific times when the scene should be active. Ideally I would like to construct the whole If statement so I can be as flexible as possible.

2) What is the expected behaviour?
String FromTime = ‘@sunrise

If time is after {FromTime + FromTimeOffSet}… Do stuff

Or something like:
String FromTime = ‘@sunrise
String Statement = 'If time is after @sunset
If Statement… Do stuff

Alternatively, if anyone has a better idea for being able to soft code the above I would be most interested.


Just use $sunset. You can put that in another variable if you want.


Thanks for the reply. I think I was over complicating matters. As there’s only two presets (sunrise and set) that change, I can accommodate then with an IF.


Been there. Done that. LOL