How often is when checked?

Mr Z shared this question 11 years ago
Answered

If I have this:

WHEN my Switch is ON

IF TEMPERATURE >= 20

THEN SEND HTTP REQUEST


How often will the when logic tested.

Vill it send several HTTP as long as temp>20

Or will it just test temp when switch has hone from OFF to ON?


Qustion is: is "when" checked over and over or just when the state cheches?

Replies (6)

photo
1

I tried this one yesterday but it did not work and I didn't have enought time to try something else! may be zipato may help us!

photo
1

just when the state changes

photo
1

"When" is just a trigger that trigger on changes, if I understundom it correct...


The problem with that is that you cant trigger on anything other then a state change on a device (event)


I would like to be able to also trigger on time/date


Ex: when NOW=2013-07-21


Or trigger on a variable


Ex: when Variable=TRUE

Ex: when SUNRISE = TRUE


Think that more then just event-triggers is very important!


Think that Zipato must add that functionality!

Today you CAN do it with the puzzle, But it will not be a valid Rule.

I think it is very strange that it is possible to add puzzle and then not have it as valid code...

photo
1

Rule can be triggered with event from device or scheduler and that is it.

Your example with date doesn't make sense, can you tell me exact time when this rule would execute for the first time, and how many times that rule would be executed.

Your example conditions should be evaluated in IF blocks, they can't be triggers for the rules.

Regarding invalid rules, you get warning when you try to save it, right? And another time you won't make the same mistake.

BTW, adding a variable directly in "When" puzzle is already disabled :)

photo
1

I like the design with puzzle...

But can't understand why have it so you logicaly CAN write something that then later is invalid...

photo
1

It's not a WHEN My Switch is ON


It is a WHEN My Switch change to ON


That small change should make it clearer to understand how it works!


But I still think that it usful to trigger with variables ;-)

Leave a Comment
 
Attach a file