Help requested with Virtual Switch

I am trying to create something with a Virtual Switch. All my previous attempts with virtual devices failed as I don’t seem to understand the concept entirely, but this morning I wanted to try something again.

What I try to accomplish:

  • I have a boolean value that I want to be able to set via a Virtual Switch as well as just via flow cards or directly in the Better Logic app;
  • The Switch should always resemble the state of the Boolean, so if the boolean is changed elsewhere (not using the virtual switch) it should change the state of the virtual switch;

I created a simple Advanced Flow for that, but (logically) that results in an infinite loop of switching on and off.

I am pretty sure I am overlooking an easy way to do this. Any thoughts on it?

Just add another check of the current status before you set the value. (for all 4 scenerios)
IF turned on AND variable is true THEN set variable false

1 Like

I guess in this case the Issue is in Better Logic triggering on updating without a Change

Indeed. The question is if that trigger should happen on any “set” of the value, even if it is the same, or only when it actually changes. I would say the latter, but apparently it does not work that way.

Can you test it with the build in logic?

Tried that for another one, and this seems to work as expected. So perhaps a bug or undesired feature in Better Logic.

@Caseda’s workaround does also work by the way.