Is there a way to create function / subroutines?
I have pistons triggered by various sensors in a room, each sensor has its own conditions whether turn on the lights or not.
Turning on the lights also has different conditions based on day of week and time of day etc which i put in seperate piston and use an execute piston from the sensor triggering pistons, so the light piston acts as function.
However it also executes by itself as standalone piston, if the time conditionals are met, the light turns on regardless of sensor pistons. That piston shouldn’t exectute unless it is called from another piston.
So is there a way to add functions/subroutines like that?
It can be resolved with a global veriable but i’d rather avoid dragging global veriables when not neeeded.