This object is in archive! 

Virtual switch as sensor

Klaus G shared this question 7 years ago
Need Answer

I still find it confusing that there are two types of virtual switches on the right side of the rule creator. One is in the "Auslöser" (Trigger) section and one in the "Kontrolle" (Control) section. They both look similar, but have different menus.


Could someone please try to explain the difference between those two types? Both pictures show the same virtual switch with those different menus. The first three entrys seem to be identically but I haven´t got a clue, what the other three entrys are good for.


Thanks

Klaus

Replies (1)

photo
1

I´m not quite sure but I think I got it now:


It is the same if you use the one with only three options only (on, off, any) from the Trigger section or the same three (upper) options from the control section in the "when" rule. Both will trigger the "When" rule if they are switched on or off. So there seems to be no difference.


If you select "any" from the trigger section then it will only trigger the rule if the state of the virtual switch changed! So for example if I switch on the living room (Wohnzimmer) and then switch off some of the lights with another rule, than it is not possible to switch all lights on again by just setting the the virtual switch to on again (it´s already switched on and so the rule won´t fire)


If you want to set it back you have to use the last of the six options of a virtual switch from the control section. And there is another problem with "any"! If you start the when rule with any and then select "on" or "off" in the following "when" tile (seems to be no matter if you use on or off from the upper selection or from the lower one) then the switch often is to slow to reach its new state while the rule is executed. I found it out when I had to repeat every command to alexa twice before the rule fired. So you have to insert a "wait". I started with a delay of one second but that was to long because you notice the difference. I than steped down to 0.1 (not 0,1 as Germans tend to try) and now it seems to work.


To put it in a nutshell:

- First three options of a virtual switch from the control secton seem to do the same as the options from the trigger secton.

- The difference is "any" From trigger section the rule fires if there is a change in state and from controlsection it fires if there is the right state, no matter if there was a change in state or not.

- The detection of a (beginning) change of state is faster than the change itself.


Hope I got it right, otherwise I would be glad to hear your experiences.

Leave a Comment
 
Attach a file