Virtual Device for manual override states while also have a correct on/off state

Okay maybe this title is a bit difficult to understand. I want to make a button/virtual device to manually override our sleep state. So, when I turn that device on, it will register us being awake. Turn it off to make us asleep.

But I also have Flows to register our states, the virtual device is only for some situations this fails. But I want to reflect the virtual device to adapt to the current state. So when we are asleep automatically, the virtual state should turn off.

The problem: when turning off, the Flow hooked to that virtual state is also run. Which makes us redundant awake and logs a line in the timeline (which is unnecessary, because it wasn’t a manual override). Is there a way to bypass this?

When you create a VD of type “Modus”, you can set the VD to on or off state without sending a trigger.
So it only affects the VD’s state.

Turn on
Turn off
Turn on or off
Set state to On without sending a trigger
Set state to Off without sending a trigger

Oh my that sounds too logica when you say it. I was already wondering what trigger that should be… :man_facepalming:

Well, one cannot know everything :wink:

1 Like