# How to set a virtual device boolean (cont.)

**URL:** <https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257>\
**Category:** Questions & Help\
**Tags:** app, flow, virtual-device\
**Created:** [March 23, 2023, 12:34am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257 "2023-03-23T00:34:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [March 23, 2023, 12:34am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/1 "2023-03-23T00:34:00Z")

</div>

Other questions did not clarify this, or I missed something. I’m trying to set the alarm of a virtual device with a flow (motion\_alarm capability was selected). However, I could not find any value that was accepted (Ja, ja, true, True, Waar, waar, 01, 0). How can I set this boolean?

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/6/a685fbc6235b4fcaa4b4dc6562f5aa347a973d42.png)

---

<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:** [March 23, 2023, 1:41am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/2 "2023-03-23T01:41:12Z")

</div>

It works slightly differently.  
At “sensor” you literally fill in the sensor capability yourself, `alarm_motion`  
 ![Screenshot from 2023-03-23 02-38-51](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e36af33646608daac6e526c83ff8874a3d2ce96b.png)

and at “value” look up the tag of the motion alarm . The value of that tag is true or false  
 ![Screenshot from 2023-03-23 02-39-12](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/9/09f4cd4b8d82c6b76c0a00704bd7ea63aea7b978.png)

The capability can be found on the developer page, search for the device whose [motion alarm] tag you use:

 ![Screenshot from 2023-03-23 02-37-26](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/a/1acfcbfc6c724dcc27a4f376840ca12a9dc1e9d7.png)

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [March 23, 2023, 6:22am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/3 "2023-03-23T06:22:50Z")

</div>

Is this a Dutch topic? 🙈 Please translate your helpfull information.

---

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [March 23, 2023, 9:03am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/4 "2023-03-23T09:03:12Z")

</div>

Thx Peter. Only this doesn’t eliminate the error.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/7/27ca061272f7b3f25d04bebaa4fb8db8c4f18a82.png)

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f54183359c10eee03c242ee327c4bff33c0d8054.png)

Moreover, what would be the card to switch off the alarm?

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [March 23, 2023, 9:12am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/5 "2023-03-23T09:12:33Z")

</div>

What you have as the tag now should be what the value needs to be (`true`, `false` or a Boolean tag of _another device_ that it needs to follow/mimick).

What you are trying to do now is set the value to the same value, as that value has never been set yet, it will be “null” (no value) which isn’t a valid value.

---

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [March 23, 2023, 9:24am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/6 "2023-03-23T09:24:25Z")

</div>

Thx, totally correct and that was the question that was unanswered. The remaining question is however what the correct syntax then should be, because no matter what I’m trying the flow keeps throwing an error.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/9/49529179f8640a48af065c0c5c616ee7aece994b.png)  
Sensor = “alarm\_motion = true” (meaning ID = true/false)  
Waarde = “Bewegingsalarm” (meaning device capability)

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [March 23, 2023, 9:26am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/7 "2023-03-23T09:26:34Z")

</div>

No, the “Sensor” should be only the capability ID, and the “Value” the value that capability has to be, so like this:  
Sensor: `alarm_motion`  
Value: `true`, `false` or the to follow tag

---

<div class="post-metadata">

**Author:** ![PV2134](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pv2134/32/16433_2.png) [@PV2134](https://community.homey.app/u/PV2134)\
**Post date:** [March 23, 2023, 9:42am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/8 "2023-03-23T09:42:55Z")

</div>

Of course! Because the card itself was already pointing to the device (in my case PIR-20) and using the tag “Bewegingsalarm” would be redundant. Thx for you help!

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 23, 2023, 10:59am UTC](https://community.homey.app/t/how-to-set-a-virtual-device-boolean-cont/78257/9 "2023-03-23T10:59:10Z")

</div>

Just as suggestion, perhaps Advanced Virtual Devices from Device Capabilities, fit you better: There might be a little learning steps, but flowcards are build based on your naming of properties, thus, making flowcards (way) more readable, imho.

But it depends on your further needs ofc.
