# Lights on when entering from outside only

**URL:** <https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994>\
**Category:** Questions & Help\
**Created:** [August 18, 2019, 7:30am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994 "2019-08-18T07:30:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerryk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jerryk/32/12592_2.png) [@Jerryk](https://community.homey.app/u/Jerryk)\
**Post date:** [August 18, 2019, 7:30am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/1 "2019-08-18T07:30:41Z")

</div>

Hi Guys, seeking your experience in this situation.

I only want the room lights to be auto on when i open the room door from the outside. And nothing happens when I open the door from the inside.

The product i will be using for this situation can be either an aqara door sensor or an aqara motion sensor.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [August 18, 2019, 7:41am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/2 "2019-08-18T07:41:18Z")

</div>

One solution would be to use both sensors.

IF motion is detected AND door is closed =\> no light on.

IF door is opened =\> lights on.

An alternative with only a door sensor would be:

IF door opens AND you are not home =\> light on

---

<div class="post-metadata">

**Author:** ![Daniel\_S](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daniel_s/32/24881_2.png) [@Daniel\_S](https://community.homey.app/u/Daniel_S)\
**Post date:** [August 18, 2019, 7:50am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/3 "2019-08-18T07:50:18Z")

</div>

I would do it oposite way. IF no motion in the room, AND door open THAN turn on light. This avoids situations when someone else come in the room and somebody is in there.

I believe Jerryk means any door in the house, not the main entrance door

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [August 18, 2019, 8:03am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/4 "2019-08-18T08:03:32Z")

</div>

Like Daniel stated i have a simular setup.  
Motion sensor inside the room and a door contact. WHEN door opens AND no motion in the room THEN turn on the light. That way the light also won’t turn on when leaving the room.

---

<div class="post-metadata">

**Author:** ![Jerryk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jerryk/32/12592_2.png) [@Jerryk](https://community.homey.app/u/Jerryk)\
**Post date:** [September 6, 2019, 4:56am UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/5 "2019-09-06T04:56:19Z")

</div>

Thanks so much guys, it works perfectly now!

---

<div class="post-metadata">

**Author:** ![Goliath](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/goliath/32/15652_2.png) [@Goliath](https://community.homey.app/u/Goliath)\
**Post date:** [September 21, 2019, 4:30pm UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/6 "2019-09-21T16:30:21Z")

</div>

This was a great setup. I’m doing similar thing but instead of light I run my Sonos favorite music. The problem I’m facing is now when I leave the bathroom I want to turn of the music automaticlly. I dont really know how to do it. I also have motion sensor inside the bathroom and door sensor.  
One scenario I also want to cover is when I leave the bathroom but forget to close the door.

Hope someone can help me with that.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Mariomark1541](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mariomark1541/32/178160_2.png) [@Mariomark1541](https://community.homey.app/u/Mariomark1541)\
**Post date:** [July 28, 2020, 6:53pm UTC](https://community.homey.app/t/lights-on-when-entering-from-outside-only/16994/7 "2020-07-28T18:53:34Z")

</div>

Here the same thing
