Virtual switch in rules not working

Jérôme Chomé shared this problem 11 years ago
Solved

I have created a virtual switch (isAway)

I wanted to use the switch in a rule with a AND operator.

I wanted the rule to send a notification when the Door is open AND the virtual switch is ON


but this is not working. It keeps sending notification on door opening even if the switch is OFF.

See attached file.

Replies (5)

photo
3

you should try


when door is opened (event)

if isaway then

else

photo
1

That's it, like Olivier said, you need to use IF (I think you can use only "IF" condition instead of "IF/ELSE"

photo
1

Thank you but I changed my rule as you suggested (see attached picture) but it is still sending notification all the time. Looks like it doesn't see that the virtual switch 'isAway' is OFF.

photo
3

@Jérome it seems you used a "control" blue box within you "if" clause (you can select on/off in the menu). (@zipato why allowing this?)

I think your rule is simply turning on your virtual device when you open the door.Use a "sensor" blue box instead for the if. You will be able to select true/false/any in the menu for your virtual device.

photo
1

Thanks Olivier, that was the problem. It now works perfectly :-)

Leave a Comment
 
Attach a file