# Optimize my TV integration with Virtual device

**URL:** <https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311>\
**Category:** Flows\
**Created:** [August 6, 2020, 12:11pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311 "2020-08-06T12:11:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxime](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maxime/32/17354_2.png) [@Maxime](https://community.homey.app/u/Maxime)\
**Post date:** [August 6, 2020, 12:11pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311/1 "2020-08-06T12:11:33Z")

</div>

Hello there,  
I 've tried to manage my TV : i’m using an IR remote (broadlink mini) and a smart plug to measure consumption. First step is to correctly update my TV status…

So I created a virtual device to show easily the state of my television in homey (then in homekit).

The problem is : my virtual doesn’t update with “set a virtual value sensor”. I tried with “YES” and boolean true but in both cases my virtual device is still at the same status…

Do you know what I’m doing wrong ?

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [August 6, 2020, 12:15pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311/2 "2020-08-06T12:15:50Z")

</div>

Why nog use a virtual button as virtual tv? That’s how i did it. Just turn the button on or off

---

<div class="post-metadata">

**Author:** ![Maxime](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maxime/32/17354_2.png) [@Maxime](https://community.homey.app/u/Maxime)\
**Post date:** [August 6, 2020, 12:24pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311/3 "2020-08-06T12:24:16Z")

</div>

> [@Jan\_Willem\_Visser](#):
>
> Why nog use a virtual button as virtual tv? That’s how i did it. Just turn the button on o

Hello, I have this one :  
 ![IMG_DA35798A124F-1](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e9befd81497e20c552c6805d41e6e1a2f75ff84.jpeg)

But several things can turn on/off TV :

- A flow
- A push on the virtual device
- my TV Remote

In case I turn off my TV with TV remote I need the virtual to update his value. I hope I’m clear enough…

---

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [August 6, 2020, 12:48pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311/4 "2020-08-06T12:48:20Z")

</div>

You can turn a virtual button on and off with a flow. You can start flows with a push on the virtual button and if your remote is connected to homwy you can also switch te virtual button with your remote.

---

<div class="post-metadata">

**Author:** ![Maxime](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maxime/32/17354_2.png) [@Maxime](https://community.homey.app/u/Maxime)\
**Post date:** [August 6, 2020, 1:10pm UTC](https://community.homey.app/t/optimize-my-tv-integration-with-virtual-device/33311/5 "2020-08-06T13:10:08Z")

</div>

Ok. Thank you for your advice.  
I wondering how “set a virtual sensor” works. I thought to know it… ^^
