Is there a way so that when for example a motion sensor triggers and a state doesn’t change within x amount of minutes it triggers?
My nmap presence detection is not as fast as me entering the area and opening the door, so I would like it to wait like 2 minutes and give it some time to recognise someone came home before it sounds the alarm.
what about something like off top of head
Well this start as and idea
I have just set this up in office and it WORKS
but each time the binary_sensor.office_motion state goes on we also flick the
input_boolean.someone_in_room_1 on then off
then if the input_boolean been in the off state for 10 mins do something
someone_in_room_1:
name: "Someone in Office"
initial: off
the automation would look something
- id: 'montion gone off office'
alias: 'montion gone off office'
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.office_motion
to: 'on'
action:
- data:
entity_id: input_boolean.someone_in_room_1
service: input_boolean.turn_on
- delay: 00:00:01
- data:
entity_id: input_boolean.someone_in_room_1
service: input_boolean.turn_off
now let do someting if input_boolean.someone_in_room_1 been in a Off state for mins
- id: 'montion on for x min'
alias: 'montion on for x min'
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.someone_in_room_1
to: 'off'
for:
minutes: 10
action:
- data:
entity_id: switch.that_thing
service: switch.turn_off