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

**URL:** <https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787>\
**Category:** Flows\
**Created:** [June 25, 2021, 12:21pm UTC](https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787 "2021-06-25T12:21:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon61197305](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon61197305](https://community.homey.app/u/anon61197305)\
**Post date:** [June 25, 2021, 12:21pm UTC](https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787/1 "2021-06-25T12:21:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 25, 2021, 12:34pm UTC](https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787/2 "2021-06-25T12:34:59Z")

</div>

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.

 ![Screenshot_20210625-143406_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/1/21335cacf4ddc04d7950dae9e79cc3cdf4f61bd9.jpeg)  
Translation:  
Turn on  
Turn off  
Turn on or off  
Set state to On without sending a trigger  
Set state to Off without sending a trigger

---

<div class="post-metadata">

**Author:** ![anon61197305](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon61197305](https://community.homey.app/u/anon61197305)\
**Post date:** [June 25, 2021, 12:50pm UTC](https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787/3 "2021-06-25T12:50:13Z")

</div>

Oh my that sounds too logica when you say it. I was already wondering what trigger that should be… 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 25, 2021, 12:56pm UTC](https://community.homey.app/t/virtual-device-for-manual-override-states-while-also-have-a-correct-on-off-state/48787/4 "2021-06-25T12:56:06Z")

</div>

Well, one cannot know everything 😉
