# How to control lights with Aeotec Trisensor app

**URL:** <https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518>\
**Category:** Apps\
**Created:** [January 16, 2022, 11:03am UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518 "2022-01-16T11:03:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CortoMaltese](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cortomaltese/32/50317_2.png) [@CortoMaltese](https://community.homey.app/u/CortoMaltese)\
**Post date:** [January 16, 2022, 11:03am UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/1 "2022-01-16T11:03:06Z")

</div>

Wonder if anyone can help with controlling lights with the Aeotec app. I need to turn on lights in a room when motion is detected and the room is dark. I am using an Aeotec Trisensor for the purpose.

I have created this flow:

WHEN luminance becomes less than a variable set in Logic  
AND the motion alarm is on  
THEN starts a flow that turns the lights on

This is not working and I am starting to have the feeling that I can’t do what I want by using this sensor by itself. As a matter of fact, it would make more sense if the flow was this way:

WHEN the motion alarm turned on  
AND the luminance is less than a variable set in Logic  
THEN starts a flow that turns the lights on

However, the app doesn’t let me do it as there is no option to check for luminance in the AND section.

Any idea?

---

<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:** [January 16, 2022, 11:12am UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/2 "2022-01-16T11:12:36Z")

</div>

The second flow is the right one. The trigger must be “Motion is detected / Motion alarm turned on”.  
For luminance values you need to use the Homey build in logic cards in the And… section.

And…  
– Logic → is less than → tap the tag → tap the local tag “Brightness” → fill a value in → checkmark

Please have a look at this tutorial:

> [@Getting Started - Logic variables](https://community.homey.app/t/getting-started-logic-variables/20132):
>
> Hi everyone, in this tutorial I will tell you about logic variables and you will learn: how to create a variable the different kind of variables and; their properties and limitations some uses cases of the different types First, let’s take a look at what Athom gave us to work with, shall we? In your app, go to the ‘more’ tab and hit ‘logic’. I already have some variables in my app, so my screen looks like this: You’ll notice I made a blue mark on the printscreen, highligh…

---

<div class="post-metadata">

**Author:** ![CortoMaltese](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cortomaltese/32/50317_2.png) [@CortoMaltese](https://community.homey.app/u/CortoMaltese)\
**Post date:** [January 16, 2022, 12:29pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/3 "2022-01-16T12:29:37Z")

</div>

Thank you for the reply but I can’t use the second flow because the app doesn’t have the option to check for luminance in the AND section, as I said in my post. Unfortunately the app has only one option in the AND section, that is “motion alarm is on”.

I already use a logic card for the luminance value.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 16, 2022, 12:40pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/4 "2022-01-16T12:40:20Z")

</div>

> [@CortoMaltese](#):
>
> I already use a logic card for the luminance value.

So what’s the problem?

---

<div class="post-metadata">

**Author:** ![CortoMaltese](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cortomaltese/32/50317_2.png) [@CortoMaltese](https://community.homey.app/u/CortoMaltese)\
**Post date:** [January 16, 2022, 1:12pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/5 "2022-01-16T13:12:40Z")

</div>

The problem is that the first flow I listed doesn’t turn the light on. In fact, this doesn’t make any sense, the flow should be triggered by motion and not luminance. As I can only add another motion check in the AND section, this makes the app useless if I need to automate something based on two conditions.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 16, 2022, 1:22pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/6 "2022-01-16T13:22:09Z")

</div>

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

But you just wrote you already use a logic card for the luminance value, so I fail to see the issue.

---

<div class="post-metadata">

**Author:** ![CortoMaltese](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cortomaltese/32/50317_2.png) [@CortoMaltese](https://community.homey.app/u/CortoMaltese)\
**Post date:** [January 16, 2022, 1:27pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/7 "2022-01-16T13:27:11Z")

</div>

Ok, I see now what you mean. Luminance becomes a variable in the system when adding the app. I wasn’t aware of it. What I meant is that I use a logic card for the luminance sensor check.

This solves the matter. Thank you! 🙂

---

<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:** [January 16, 2022, 1:28pm UTC](https://community.homey.app/t/how-to-control-lights-with-aeotec-trisensor-app/58518/8 "2022-01-16T13:28:15Z")

</div>

> [@CortoMaltese](#):
>
> the app doesn’t have the option to check for luminance

This does not depend on the app but on the capabilities of the device (Aeotec Tri-Sensor). As the Aeotec Tri-Sensor can measure luminance, the " luminance " capability is also available for the logic cards.
