# Motion detection with light sensor

**URL:** <https://community.homey.app/t/motion-detection-with-light-sensor/64570>\
**Category:** Flows\
**Tags:** flow\
**Created:** [June 10, 2022, 1:41pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570 "2022-06-10T13:41:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RPrakken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rprakken/32/55987_2.png) [@RPrakken](https://community.homey.app/u/RPrakken)\
**Post date:** [June 10, 2022, 1:41pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570/1 "2022-06-10T13:41:09Z")

</div>

I have a light sensor (Xiaomi Light Sensor).  
I also have an IKEA motion detector.

Now I want the lights to come on when there’s movement and the lumen count is less than 20, so it’s pretty dark.  
Otherwise not on the move.

How can I get this done? With the ‘and’ at the light sensor I don’t get the option to enter the number of lumens. Only for the battery.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [June 10, 2022, 2:46pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570/2 "2022-06-10T14:46:56Z")

</div>

**When…**  
– The motion alarm turned on (IKEA Motion Sensor)  
**And…**  
– Logic card: Brightness (Tag) is less than 20  
**Then…**  
– Turn light on

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/0/204825f9077b27f7720d9f79908ee3fddfca55a0.png)

How to use _ **Tags** _ in a flow, I suggest to follow [this](https://community.homey.app/t/how-to-use-tags-in-a-flow/9285) tutorial.

To ensure that the light goes off after a certain time, I suggest following [this](https://community.homey.app/t/simple-lights-turning-on-off-based-on-motion/10889) tutorial.

---

<div class="post-metadata">

**Author:** ![Hugo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hugo/32/11530_2.png) [@Hugo](https://community.homey.app/u/Hugo)\
**Post date:** [June 10, 2022, 2:47pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570/3 "2022-06-10T14:47:35Z")

</div>

What Fantross says  
🙂

---

<div class="post-metadata">

**Author:** ![RPrakken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rprakken/32/55987_2.png) [@RPrakken](https://community.homey.app/u/RPrakken)\
**Post date:** [June 10, 2022, 3:05pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570/4 "2022-06-10T15:05:11Z")

</div>

Ah, thank you so much.  
I didn’t know how to use Logica, now I know… 😃

---

<div class="post-metadata">

**Author:** ![RPrakken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rprakken/32/55987_2.png) [@RPrakken](https://community.homey.app/u/RPrakken)\
**Post date:** [June 10, 2022, 3:05pm UTC](https://community.homey.app/t/motion-detection-with-light-sensor/64570/5 "2022-06-10T15:05:46Z")

</div>

Thanks Hugo!
