“When things quiet down” depends on the sensor sending an inactivity report, which motion sensors do and open/close sensors don’t.
You can do just what you describe, and much more, with core.