# Knowing how a light switch was activated

**URL:** <https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554>\
**Category:** Flows\
**Created:** [June 2, 2023, 11:59am UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554 "2023-06-02T11:59:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJ\_Scholten](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj_scholten/32/58218_2.png) [@CJ\_Scholten](https://community.homey.app/u/CJ_Scholten)\
**Post date:** [June 2, 2023, 11:59am UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554/1 "2023-06-02T11:59:20Z")

</div>

Hi,

I have a number of light switches/dimmers in my house, from Shelly, EcoDim and RobbShop.  
I’m trying to figure out if you can tell, in a flow, if a switch/dimmer was activated by pressing the button, or by Homey.  
Basically, when a ‘Turned On’ event is triggered, can I tell how it was triggered?  
I know I could do it with a lot of variables, but is there an easier/built-in way?

Cheers,  
CJ

---

<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 2, 2023, 2:02pm UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554/2 "2023-06-02T14:02:51Z")

</div>

You can, by using the [Device Capabilities app](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287), but you’ll have to create this flow part for each device you want to monitor:

 ![Screenshot from 2023-06-02 16-02-17](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/f/2fb24f5d5ce7d9388fb36b041b79bf421a7e7ede.png)

But are you aware of the mobile app’s device log (longpress a device to view it), this is automatically done by Homey. This also shows flow names when a device is commanded by a flow:  
 ![Screenshot from 2023-06-02 16-04-56](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/a/ca128cc46dedc80edb7601c2dc9090bd3609759c.png)

---

<div class="post-metadata">

**Author:** ![CJ\_Scholten](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cj_scholten/32/58218_2.png) [@CJ\_Scholten](https://community.homey.app/u/CJ_Scholten)\
**Post date:** [June 2, 2023, 2:28pm UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554/3 "2023-06-02T14:28:34Z")

</div>

Hi, thanks for the reply! I’ll look into the Device Capabilities app.  
Yeah, I know the log shows it, but I want to use that information in my flow.

So, for example if a light is activated by a motion detector, or by pressing the button on the wall, different things should happen. (I know I could probably fix this in the flow that’s triggered by the motion detector, but my flows are set up differently - kinda hard to explain).

---

<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 2, 2023, 2:31pm UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554/4 "2023-06-02T14:31:25Z")

</div>

YW!

> [@CJ\_Scholten](#):
>
> but I want to use that information in my flow

Ah okay, yes then my example flow can come in handy

---

<div class="post-metadata">

**Author:** ![Pixi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pixi/32/109087_2.png) [@Pixi](https://community.homey.app/u/Pixi)\
**Post date:** [June 2, 2023, 2:54pm UTC](https://community.homey.app/t/knowing-how-a-light-switch-was-activated/81554/5 "2023-06-02T14:54:29Z")

</div>

or create and ad in your flow a variable, triggered, yes or no, these you can also use in the insights. so many roads to Rome…
