How to invert a signal


Is it possible to invert a signal?

I have a switch that turns my device on, when the switch is off.
Would be nice to say that if this switch is on, it equals off. And when that signal is off, my device is also off.

I think that can be done with a virtual switch.
I made an example virtual device and flow, you can import and use it right away (Device Capabilities app needed):

How to import:


Thank you very much, Peter! :slight_smile:

Will try it out!

1 Like


I imported the TEF, must mostly the cards are not available.

Is there any other app that I need to start?

Sorry, the green ones (switch) are KaKu, and the black ones (light) are from group app, the yellow ones are from a AVD device → which gets created if you start with adding a new AVD, and then paste the TEF at the top text field

Screenshot from 2022-10-23 19-40-16

It, (the Reversed Switch), gets created in the background, after you pressed “Read Device”:

Then you can replace devices with your own devices during import.
If you don’t have a switch device, or if it is not listed, use “Don’t change”. That means, replace the flowcards yourself after import.
During import, did you ‘replace’ the AVD with your own? You should keep “Reversed Switch” as in the screenshot.
And did you replace the light with one of your preferred devices as well?

Hope this gets you going,

Do you know if it’s possible to do the same with logic as you did with the reversed switch?

I saw this one, which says you can revert a variable. I am not sure how to use it though :open_mouth:


Yes, you can do it like this:
When the ‘source’ variable changes, set the ‘inverted’ variable to the opposite value. Then, you can use the inverted variable in your flows

But you don’t need it really, when you ‘reverse’ the flow action cards you’ll have the same result (but it might be confusing when reading your flows after a while):

Thank you very much!

This was a good solution :slight_smile:

1 Like