In hubitat webcore, as soon as I use an if statment, it act like a trigger even if I use simple condition…Is anybody know why? Is there a way to use simple comparison like if light is on do this ? For now as soon as the light change it trigger… I just comes from ST and now a lot of piston with event that have condition inside are considered as double trigger… Pretty weird!
If statment always act like trigger in Hubitat
I don’t think there’s that much change as far as if statements between the HE and ST behavior. If you don’t want device condition to become a trigger then you can go to the IF statement property and turn off Automatic subscription.
Note ST and HE behavior here is the same…
Your piston has to have a trigger of some kind, otherwise it will never fire. Maybe post a green snapshot of your code and someone can help you further.
Sometimes you just want to trigger the piston from url or in my case, I have a event as trigger, then I ll just check if a switch is on or off for example… but it register the if as a trigger even if the event is a trigger… I think I ll be ok but I need to change everything in my pistons… but in ST it was working so maybe it would in HE but I have a lot of warning… I ll try to clean and redo some block and see!
ST and HE should be the same operating in general.
You can have a piston without a trigger, it would then only run based on REST call or test, or execute piston.
webCoRE by default for a piston that has no trigger comparisons, it will attempt to promote condition comparisons to a subscription/trigger. You can control this if you do not want it, but it is the default
If you have specifics for something not working, the green piston and logs is the best way for folks to help you if there is a bug or not (either piston or webCoRE itself).