Lights on when entering from outside only

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!

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

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

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.

Thanks so much guys, it works perfectly now!

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

Here the same thing