Simple question - firing a piston once a day


#1

1) Give a description of the problem
I’d like the piston to only fire once a day

2) What is the expected behavior?
Fires once a day

3) What is happening/not happening?
Seems to still trigger more than once in the AM

**4) Post a Green Snapshot of the piston!

I lifted some code from the forum, not sure why this isn’t functioning as planned? Assuming its something simple (which may help other “newish” users like me) :slight_smile:


#2

You don’t appear to have anything setting the last day variable (which should also be a ‘string’ variable - not integer)


#3

Apologies, here is the full piston


#4

Also appears you are setting the value inside the variable define section… leave the value as ‘not set’ so it won’t reset to ‘13’ every time the piston runs.


#5

OK, changed to a string but this was already set to ‘no value set’ is it showing ‘13’ as todays date?


#6

Actually $day is an integer, so you had it right to begin with.

image

image

You do have 2 triggers in this Piston. So the routine will also set it off without evaluating any of the other conditions.

If it’s not the Routine setting it off, then post some logs so we can dig into the weeds a bit.


#7

Sorry… my bad… was thinking about $dayOfWeekName


#8

Seems to be working fine, I’ll give it a shot. The Manual routine call is only made if Alexa triggers it or someone physically hits the button on an ActionTiles dashboard or in the ST app