Hi I have a motion sensor in office which turns on lights when I walk in.
I have a motion sensor in staircase.
I have the following set up so when I walk into the office the lights go on
when I go towards staircase the office light goes off.
Problem is evertime I walk out of the office the lights close which is ok but sometimes I only leave for a minute. so wanted to add a delay.
I added delay in the turn off office automation which worked. But problem is even though I walk back into the office within the 2 minutes the light closes 2 minutes later.
would like to modify the automation so that when I walk back into my office and the motion sensor in office sees me it cancels the 2 minute off cycle.
this is what I have
- id: '1608423397772'
alias: office on with motion
description: ''
trigger:
- platform: state
entity_id: sensor.zooz_sensor_office_burglar_2
to: '8'
condition: []
action:
- type: turn_on
device_id: f9da103eb77c412cbb080627e0ec9328
entity_id: switch.office_light
domain: switch
mode: single
- id: '1610481877555'
alias: turn off office if motion in staircase
description: ''
trigger:
- platform: state
entity_id: sensor.zooz_sensor_basement_staircase_burglar
to: '8'
condition: []
action:
- delay: '00:02:00'
- type: turn_off
device_id: f9da103eb77c412cbb080627e0ec9328
entity_id: switch.office_light
domain: switch
mode: single