I was wondering if anyone has created an automation that runs after a certain time and checks if a all the device trackers are home and if they are it will put the house into an armed night state using the HA Alarm.
EDIT: Got it working going to leave this thread up incase someone else needs it thanks for everyones help
I use a group called “family” with the device_trackers and have an automation that arms the alarm when the group is “not_home” for 3 minutes…
You could do the same with the “person” entities… but those weren’t a thing when it was originally setup.
The problem with groups in this case is that if one person is home the group will be home, but you can use the group in a different way.
I think, make a time trigger and use a template condition to expand the group and check each member of the group. The alternative is to put a state condition for each member/person and “and” them together.
Easy enough to do, I think it just depends on wether you want it to be a simple time trigger or more intelligently based on other states like everyone is home and no downstairs lights are on and all doors are closed etc
We have the alarm set to night mode when we issue a bedtime routine command.
If you want a simple time based then simply set time as trigger, with either a condition of all trackers in the state of home, or time trigger and wait for all trackers to be home and set alarm. But what happens if everyone is home and the time is triggered but a door is open, what does your alarm do at the moment, or do you want to add a wait for all doors to be closed in the time triggered automation.
Ultimately it can be as simple or as complicated as you want to make it
Thank you I did not pay enough attention and thought he was trying to arm when everyone left the house… missed that he was trying to arm when everyone got home… in that case i would probably do it with a template sensor and trigger off that… like you mention for the condition above