Garbage Pick Up Reminder


#1

1) Give a description of the problem

I am getting double notification for this piston

2) What is the expected behaviour?

Supposed to get one notification every Wednesday. It will be either trash day or recycle day.

3) What is happening/not happening?

I am getting double notification for this piston

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full



#2

It looks to me like your piston basically says:

If trash pickup week is true
Then
 Notify
 Set trash pickup week to false
Endif
If trash pickup week is false
Then
  Notify
  Set trash pickup week to true
Endif

That’s ok is task pickup week starts off false. However if it is true, you are setting it to false and then testing if it is false, which it is because you just set it, and then setting it back to true again.


#3

I understand what you mean. Is there a way to exit the first if statement if it gets executed?


#4

I think you just need an ‘else’ so only one block runs. I’d probably have a structure like:

If collection day is tomorrow
Then
    If trash pickup week is true
    Then
        Notify
        Set trash pickup week to false
    Else
        Notify
        Set trash pickup week to true
    Endif
Endif