# Read/detect color of STB to determine power state

**URL:** <https://community.homey.app/t/read-detect-color-of-stb-to-determine-power-state/95554>\
**Category:** Questions & Help\
**Created:** [November 23, 2023, 8:53pm UTC](https://community.homey.app/t/read-detect-color-of-stb-to-determine-power-state/95554 "2023-11-23T20:53:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WinnieandBuzz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/winnieandbuzz/32/60352_2.png) [@WinnieandBuzz](https://community.homey.app/u/WinnieandBuzz)\
**Post date:** [November 23, 2023, 8:53pm UTC](https://community.homey.app/t/read-detect-color-of-stb-to-determine-power-state/95554/1 "2023-11-23T20:53:38Z")

</div>

My set top box (STB) does not have discrete power on and off commands but a power toggle. It does however has an indicator light that is red (off) and green (on). I would like to use some kind of light sensitive sensor that can detect the color of the light and with that I would be able to determine if it on or off before sending an IR command to toggle the power on or off. Does anyone have a suggestion what type of sensor I could use or an alternative way of tracking the on / off state?

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 23, 2023, 9:40pm UTC](https://community.homey.app/t/read-detect-color-of-stb-to-determine-power-state/95554/2 "2023-11-23T21:40:13Z")

</div>

Use a wall plug and when power is greater than X it is on.

---

<div class="post-metadata">

**Author:** ![WinnieandBuzz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/winnieandbuzz/32/60352_2.png) [@WinnieandBuzz](https://community.homey.app/u/WinnieandBuzz)\
**Post date:** [November 24, 2023, 5:54pm UTC](https://community.homey.app/t/read-detect-color-of-stb-to-determine-power-state/95554/3 "2023-11-24T17:54:21Z")

</div>

Great idea! Did not think of such a simple solution 🙂
