How to make a rule that sends message only once

Nino Gasic shared this question 32 days ago
Answered

I am trying to make a rule that sends a message when the luminance is over a certain point and that works.

The problem i have is that as long as the luminance is over that point i will get the message over and over again.

I would like to only get the message once and when the luminance gets under the certen point and the gets over agen the message will be sent again.

Is this possible to do?

Comments (5)

photo
1

Hello,

you must first create a variable and define it (replace "select" by creating your variable and activate the switch to set the variable to 0 :

/23198e5cb254e6505eba90e101a7f0e0


Then create the rule (Replace "select" by your created variable) :

/8a9354f9b95c014d0fa50a161cc48700

photo
1

Hi

each rule is trigger but certain event - it means each time when luminance is over a certain point the rule will be triggered.

The solution in your case could be to add virtual switch which will chaange state if luminance over certain point is triggered or not, i.e. to set tru when first time is over and set to false when first time is below a certain value.

Add this virtual switch to the if loop as the AND condition.

photo
1

Indeed Dino's solution is better. In the rule, the variable must be replaced by the virtual switch.

photo
1

Thanks I'll try this.

photo
1

Hi

just keep in mind to add Join puzzle to avoid triggering rule during time when it is executing.