I am new with HA. I have in the office 3 motion sensors, one at the door and one on each desk (my wife and myself). I want to wait until the three motion sensors have not detected motion for at least 15 mins each.
So far this is what I have:
alias: Office Off
description: ''
trigger:
- type: no_motion
platform: device
device_id: device1
entity_id: binary_sensor.lk_zb_motionsensor_d0003_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- type: no_motion
platform: device
device_id: device2
entity_id: binary_sensor.lk_zb_motionsensor_d0003_ad2dcffe_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- type: not_occupied
platform: device
device_id: device3
entity_id: binary_sensor.philips_sml001_10f11609_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
condition:
- type: is_no_motion
condition: device
device_id: device1
entity_id: binary_sensor.lk_zb_motionsensor_d0003_ad2dcffe_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
- type: is_no_motion
condition: device
device_id: device2
entity_id: binary_sensor.lk_zb_motionsensor_d0003_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
- type: is_not_occupied
condition: device
device_id: device3
entity_id: binary_sensor.philips_sml001_10f11609_occupancy
domain: binary_sensor
action:
- type: turn_off
device_id: my_switch
entity_id: switch.office_light
domain: switch
mode: single
But if one sensor has not detected motion for at least 15 mins and the others just stopped detecting motion (just a few seconds) the action will be triggered. I understand that based on my automation that is the correct result, but I want to know how to wait to at least 15 mins on every sensor.