Hey, @ffingers! Glad to see you back. Do give me an update on the countertops when you can. It sounds really cool! We're way overdue for a kitchen remodel here and my wife is thinking poured countertops as well. Are you embedding channel for the LEDs in the concrete forms? I'd love to see pictures.
The answer to your question is yes, you can do that. It's the blessing and curse of highly programmable devices: the answer is almost always yes, but there's always a little code involved in making it do exactly what you want.
If you're turning individual segments on and off, probably the easiest way is to add a
lastState variable to the pattern that tracks the last state of the on/off switch for the segment you're interested in. Then at
beforeRender() time, check the variable and if the switch is "on", and
lastState was "off", do whatever effect initialization you need.
If you're turning the whole strip on and off from the main device (not the children), you'll probably want to add an exported variable like
__restart to your pattern, initialize it to False (0) and again, check at
beforeRender() time, and do your effect initialization if it is True. (Then set it to 0 again to be ready for the next cycle.)
To make this work you'll just need to add a
SetVariables("__restart",1) command to the
on() command handler in the main device driver.
In any case, you might want to download the latest "Multisegment for Automation" pattern again -- I fixed a bug that could potentially cause on/off switching problems this afternoon!