There are several different ways to accomplish this. I don’t know if my way is the most elegant way of coding or shortest but I use this at home and it works.
if time is between this and that
and
if KITCHENSIM is OFF (I will explain this)
and
if motion detected
Do this do that
if motion stays inactive
do this do that
so this is very similar to your piston, I just added the simulated switch
Now create a Simulated switch in ST IDE and lets call that KITCHENSIM
And create an Alexa routine that turns ON and OFF the KITCHENSIM switch. not the lights.
So your piston continues…
IF KITCHENSIM switch changes to ON
and
time is betwenn this and that
Turn ON kitchen lights…
IF KITCHENSIM switch changes to OFF
turn OFF kitchen lights.
so basically if the sim switch is ON your piston will ignore motion detectors…
and changing that ON will trigger your lights…
How do we go back to motion detectors?
a - you can turn the KITCHENSIM OFF via voice
b - setup a timer
c - if no motion for a longer period of time…
AS i said I am sure there are better ways of doing this but this might be a good start.
You can also use variables if this piston or scene is effected by other pistons etc…
note : I just assumed you would know how to create a sim switch… If not pls drop a line, I’ll explain that.