Can't figure out what's wrong with my piston


#1

Below is a screenshot of my piston which basically is supposed to do the following,

if time is between 10:45AM and 10:45PM and Smart Home Monitor status is Away and the room temperature goes above 26 degrees and if the A/C is off then turn on A/C and send push notification displaying the temperature. If it’s not greater than 26 degrees and it matches other time and SHM condition then if A/C is already on the turn it off. And if it doesn’t match the time and SHM condition and A/C is on then turn it off.

When i arm my SHM the piston goes crazy and i keep getting the temperature notification, meaning it keeps trying to turn it on

Here is the piston screenshot:


#2

Try moving this…

image

before the end with


#3

Tried that and it hasn’t helped


#4

I would change the first if statement into a condition (Only when: time is between X and X AND SHM is armed/away) and maybe group the remaining if statements into 1 group all with the above condition

Then use if statements for the other triggers like temp > x AND switch is off, else if…

What is currently happening is your first if statement is running almost continuously during the hours of 1045am and 1045pm when SHM is armed/away. this will cause all of the extra notifications.