That sounds like a crazy basic question but I really can’t find the answer by myself.
I want to make a piston that is only executable by other pistons.
I have x lights in a room and I created a virtual master switch to turn on/off all of them from that switch (Master switch used in homebridge and actiontiles fr example). My list of lights is in a global variable and I created a piston where if any of the light of the list is on then turn everything off otherwise turn everything on… Indeed I entered an infinite loop since that piston is triggered as soon as 1 of these lights changes of state…
So I want this piston to be only executable from another piston and not from a device change of state.
Am I doing this completely wrong ?
Any help is appreciated and sorry if that’s a dumb question.
Thank you
A piston only executable from other pistons
If I understand your question, you want a piston to only execute if it is called from another piston? In your toggle piston above, open the cog in the IF statement and unsubscribe from the switch. Then when you save the piston you should get the following message
This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.
Then your piston will only run if it is called from another piston.
There is an advanced options under the piston settings (click the piston name, then the cog button) that disables all subscriptions, effectively making it a “do” piston - CoRE equivalent.
@Boxfan, @ady624 this is exactly what I was looking for, thank you !
I couldn’t find this anywhere. Is this somewhere in the docs I missed ?
Thanks again !
@jrfarrar I have a list of 3 switches. if any of this switch is on then I want to turn all of them off else I turn all of them on. Is that clearer like that ?
How you are using this functionality? Or am I missing that you are just trying to sync up 3 switches so that when 1 gets turned off the other 2 get turned off also?