1) Give a description of the problem
I have a number of pistons that control various evening lights. The start times are based on offsets from $sunset. The end times are based on specific times. The pistons are specifically written with the start/stop timing so they work together - which I ‘hard coded’ into each piston. Again, that all works. However, If I decide to change one witout mentally taking ionto account the others, thngs may get jumbled. What I’m now trying to do is set two global variables - PMOn and PMOff and then use those global variables in each piston as base times that I add or subtract offsets (in minutes). This would allow me to change a global variable and all of the pistons would automatically move in unison with that change - without having to modify each piston while mentally keeping the timing of each in mind.
I can handle creation of the @PMOff variable since the PMOff times are all based on specific times and not a system variable. I’m having trouble creating the @PMOn global variable. I attempted to use:
addMinutes($sunset, -x) in the expression section of the global variable setup for a ‘time’ type variable, but the expression disappears once the global variable settings are saved. So, I’m sure I’m doing something wrong. Here’s the table of my pistons showing the current and new times global variables names and offsets, etc.
So, the specific issue I’m having is creating the global variable @PMOn using the expression addMinutes($sunset, -x) so I can use it in the other pistons. I’ve figured everything else out.
2) What is the expected behavior?
See above
3) What is happening/not happening?
Pistons are working as is. I want to move to the next level and introduce cross-piston flexibility.(i.e., change a global variable (or two) to move start/stop times - while keeping same relative timing between all pistons.
4) Post a Green Snapshot of the piston
This is just one of the pistons (probably the simplest one) that I’m talking about
5) Attach any logs (From ST IDE and by turning logging level to Full)
Not needed