You can use 2 pir sensors, one outside the door, another one inside, and use conditions like if one was active when the other activates.
EDIT: Take a look at Fibaro’s counting people example here to make an idea of what I’m talking about.
I have xiaomi PIR sensor, and they are great, but I understand that once triggered, the next trigger will be recognizes only after 60 seconds. Is for all PIR so?
If not can you recommend which PIR to get (hopefully not too expensive) .
p.s. additional problem: in entrance (outside) I have 2 large dogs (yeah, don’t ask me why …) but I guess the PIR sensor can be put “higher”
Never compiled a scene before myself (just started with HA 3 weeks ago) but i’ll give it a try:
scenes:
scene:
- name: Entering
entities:
light.entrance: on
brightness: 125
rgb_color: [255, 255, 255]
- name: Leaving
entities:
light.entrance: off
automation when entering:
trigger:
platform: switch
entity_id: switch.pir_entrance
state: on
### I'm not sure about the switch trigger syntax, my 433 mhz door sensors should be delivered today so I can test :slight_smile:
condition: and
conditions:
- condition: sun
after: sunset
after_offset: "-0:20:00"
- condition: state
entity_id: scene.Leaving
state: on
action:
service: scene.turn_on
entity_id: scene.Entering
automation when leaving:
trigger:
platform: switch
entity_id: switch.pir_entrance
state: on
### I'm not sure about the switch trigger syntax, my 433 mhz door sensors should be delivered today so I can test :slight_smile:
condition: and
conditions:
- condition: sun
after: sunrise
after_offset: "0:20:00"
- condition: state
entity_id: scene.Entering
state: on
action:
service: scene.turn_on
entity_id: scene.Leaving
Hey! Thanks a lot for you time, I really appreciate.
The possibilites are:
ENTERING
The outside trigger changes state from OFF to ON, AND, is SUNSET, AND the inside trigger goes from OFF to ON … ACTION turn ON the light. Fine
EXITING
The inside trigger changes state from OFF to ON, AND, is SUNSET, AND the outside trigger goes from OFF to ON … ACTION turn OFF the light, Fine
MOVEMENT OUTSIDE (NOT ENTERING)
The internal light will not change state. Fine
MOVEMENT INSIDE (NOT EXITING)
The internal light will change state from OFF to ON (will need another automation including SUNSET trigger). FIne
yes yes, of course. The Fibaro example is for an indoor door (like kitchen/living), and there the triggering can be more often then an entrance door (I think)