Thanks for the example. My only concern here is that there’s no “lightning” icon next to the else if statement, i.e. i guess it means that is not subscribed to events and won’t get fired? Also this piston says that it’s not subscribing to events and won’t be fired automatically. Doesn’t look good, or am i missing something?
@ady624 is it possible that the piston subscribes to the events (as per sshot above), but the piston web page still has this warning
That is a bug with display. The stays is a trigger and should subscribe. Also, in advanced options of the conditions, you can force a condition to subscribe even when mixing it with triggers. Or stop a trigger from subscribing. Complex logic you make.
Not sure if this is a bug or not, but when using the green camera to post images “safe to publish” if one includes their phone number for SMS, it will come over if someone tries to import the piston. The devices are removed, but the phone number will import even though it is redacted in the posted image, it still shows up. Thanks to @BlackCatPeanut for pointing that out for me.
does that mean the function has to yet be implemented or that the description in the wiki is still missing? Based on a quick test I have to assume the former
I know it’s not a solution to what you are asking, but consider creating a global variable and store a phone # there. Thus if you have multiple pistons that send you an SMS, and you change your number, you’ll need to update only this variable.
The function is implemented, it is an alias of sprintf - look that up on google.
Example:
format('The temperature outside is %.2f degrees Fahrenheit', [Temp sensor:temperature])
The first parameter is a format string, then for each % add a parameter… the number of parameters is dynamic depending on how many parameters (%) you use
I need to check and see if reading a global variable reads values previously set by the same piston, it should - values are saved to global store at the end of run. I checked, it should do it correctly.
don’t think that’s the problem - in that case I would still have had values different from 50 on a 2nd run, however it’s always 50. Does the expression look right? What exactly do curly brackets signify? That everything between them will be passed to a proverbial eval() ?