Action based on trigger status for x minutes


#1

1) Give a description of the problem
I have a power meter on my washing machine. I want to be alerted when the power falls below 5w and stays below for 5 minutes. I know how to set the condition of the power below 5w - but how to add the time to the condition? The condition should only trigger an action if it stays below 5w for minutes, otherwise it shouldn’t. Thanks


#2

Use Stays below X watts for Y minutes


#3

Together will “Drops below…”?

Have a look at this pistion - does it look right - or is “Stays below” enough?

Thanks!


#4

Just use one… keep line 20.

Edit: This is what I use… really old code so excuse the clutter :slight_smile:


#5

Thanks!


#6

I have tried everything, but just cannot find out how to do the “Set variable…”. Can you point me in the right direction?

Thanks.


#7

Hmm, Add a task, if you don’t have a device selected, use Location. You’ll see Set variable command.


#8

Ok, thanks. Just seems strange to do that with Location. But anyway, I will check if it works.
Thanks.


#9

Location is the default device if you’re not interacting with any specific device. You can create pistons that can be called from other pistons that only does calculations etc… those times you use Location as your device. You can still pick a specific device, it just shows you more commands that applies to that device type.