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?