I was hoping someone could look over my automation and let me know what’s wrong with my condition. I was able to narrow down my issue to the condition setting because when I remove it the automation triggers fine, but when I have it in there it refuses to trigger. My goal is for the automation to only trigger if there been no movement for 10 minutes.
This condition requires that all those motions sensors are in the off state and that they each have been for at least 10 minutes. If that is not the case when the automation triggers (i.e., when group.family_tracker changes from home to not_home), then the actions won’t run. Have you looked at the history of those entities to see what state they were in in the 10 minutes leading up to the trigger event?
EDIT: Do you really only want it to trigger when the last person has left home if at that time there has been no motion for 10 minutes? Or do you want the actions to run 10 minutes after the last person leaves, as long as there has been no motion since they left? Or maybe something else???
The trigger fires when the last person in the group left home.
The condition states that any motion in the last 10 minutes will block the trigger.
So do they have to wait ‘just outside the front door for 10 mins’ before actually leaving to fire this automation ?
Ive never seen an automation remotely like this, I’m intregued as to what you doing here.
As far as I can tell, if I ‘break in’ 9 minutes after the last person leaves (or earlier) and keep moving around I can prevent the alarm going to armed.
Then that’s what you have. Again, check the history of the entities involved. If it’s not running the actions then not all the motions sensors have been off for 10 minutes when the last person leaves.
@Mutt its in case someone is inside the home that does not have a device tracker. Like if the people cleaning our home are inside and I run out for an errand with my wife, I sent want the alarm to arm and the HVAC to go into away mode. While, I do agree that someone could break in as soon as I leave, I am not really worried about that as.
@pnbruckner I have watched the logs, it simply never gets triggered. Which led me to believe I may be doing something wrong.
@pnbruckner I re-read what you wrote and I think you mentioned something that is key here. When the last person leaves the home and the group.family of device trackers switches to not_home, this typically happens before 10 minutes. So when the automation triggers, the condition checks and sees that there has been motion in the last ten minutes since and prevents the automation from firing. That is not the behavior I am looking for. I want the automation trigger when the last person leaves and wait 10 minutes to make sure no one is left in the home before arming the home in away mode. How would I modify my automation to reflect this?
I could propose an alternative as I wanted to solve something similar: on the days our house cleaner and gardener are in, I enable my “contractor mode”. It’s also useful for when any other contractor (e.g. doing repairs or maintenance) are home and we are not or need to step out. This is basically an input_boolean that I treat like a switch from Lovelace. I then check the state of this to prevent or allow certain automations to run. With this, I have notifications for when this “variable” gets enabled or disabled, or left on for “too long” - for safety reasons.
Precisely (thank you finity)
I also dislike this automation as it ‘assumes’ the default is ‘not arming’ if there is movement (so your contractors also need to keep moving around in the monitored rooms and aren’t allowed to sit down for 10 mins to have a bite to eat or a drink of coffee).
I much prefer @parautenbach ‘s suggestion as that implies a deliberate act that you consciously need to take. You could set the suggested input boolean’ for the coming day or for the Thursday morning that your cleaner comes etc. Relying on them constantly in motion is going to end up with more grief.
What happens when the plummer needs a new o-ring and doesn’t have one is his van you need to take time to plan how this will actually work in practice. Do you give your contractors keys or can he leave the house unlocked with the alarm off ?
@Mutt I do use an input-boolean as well as @parautenbach had suggested. This condition I describe in the first post is mainly when I forget to set the boolean. It gives the person inside a fighting chance without the home auto-arming. I do agree with you though there should be a better method for presence detection. I am working on a future project with room-assistant and using BLE for this with a raspberry pi zero w.
You reminded me of something I forgot to mention (just for completeness’ sake): I turn this “switch” on a schedule by default on the days I know the cleaner and gardener comes. I still get notifications when that happens, so that I can cancel/revert the action (e.g. I’m working from home so there’s no need).
I haven’t yet done this, since I first need to make my alarm system smart, but in the end I’ll use the home zone and this “variable” to say: “Oh dear, nobody’s home, and you didn’t arm the alarm. Would you like to?” I think one can then avoid the for: which acts as a timeout.
I personally use node red for this Automation and I can share with you the complete setup in node red. I used input-boolean and guest mode (if you enable guest mode then the automation is interrupted)
I converted all my automations from home assistant to node red so I can setup a watchdog in HA that checks if node red is responsive and if it is not then it will restart the addon. please watch this video: