i have recently installed hass agent for my pc and have been trying to set up an automation to set my pc to send a notification when the last active sensor has been idle for 5 seconds (as a test) and have found the template
{{ (now() - states(‘sensor.craigs_pc_lastactive’) | as_datetime).total_seconds() > 5 }}
but unfortunately it takes quite some time for it to trigger usually far more then 5 seconds i was wondering if there is any other way for me to accurately get sent a notification on time after my pc has been idle for 5 seconds?