This object is in archive! 

Don't understand how to use variable's in rule

Lars Fransson shared this question 10 years ago
Need Answer

Hi!

I like to get an e-mail as soon as the temperature are below 19 degree celcius in my house.

Hovever, since the Aeon labs multisensor is sending the temperature to zipabox quit freequently so would I like to have an variable to check if I have sent an e-mail today. If no send e-mail else dont send.


I made the rule like attached but it does not work and it has to do with the variables,


I dont like to make a schedual that is checking this once a day.


Thanks in advance

Lasse

Files: temp.JPG

Replies (4)

photo
1

Where you have IF dayofmonth(now) = Temphus

I think that needs to be IF dayofmonth(now) <> Temphus

photo
1

i usually do variable first then what you wanna set. But don't think that's the problem.


But why not


When temp < 19

If NOT variable Temphus=1

end email

set var Temphus to 1


Then reset the temphus to 2 every night with a separate rule.

photo
1

I think that the problem is that the variable Temphus is set in the IF statement.

So this variable is never initialized.

That mean that the if-statement probably always lead to false. However that exit is not programmed.

photo
1

Try this:

this way you can set the time between notifications (if the condition is respected)

You also can change the notif range (once a day rather than every x hours)


fIkeVtI8HBlcPHP56dUy

Leave a Comment
 
Attach a file