Automations help after migration

After migration a few of my Automations quit working. In the new automations I cant quite figure out how to set up the automation again. I guess what is confusing me is what mode to start in or do I even add the mode in “if” I had two set up on presence sensors and geofencing.

  1. If someone was away and came home the lock would unlock and set SHM to unarmed and home.

  2. If all sensors were away it would lock all doors and set the SHM to armed and mode to away.

Just trying to figure out what I am doing wrong.

When you are departing you are typically looking to see if everyone has left and then setting the location mode to Away (you need to do this yourself). You may also run scenes and arm the Security mode too and stuff like that.

As that is only going to trigger if presence changes it probably isn’t going to run more than once and might not matter if it does, but if you have more complex use cases you might want to make sure it only runs when the Location is currently Home or Night, for example. So you can add e.g. ‘if Location Mode is Home/Night’ and ideally set it as a ‘precondition’ so a mode change on arrival doesn’t trigger the automation.

It is arrival where things typically need a bit more attention. You typically look for someone having arrived and set the Location Mode to Home (again you need to do this yourself), also running scenes to enable stuff and disarming security.

That will actualy trigger every time someone arrives or leaves which may not matter but you should consider that by default the conditions are actually testing whether anyone is there. It this matters it is typical to only run it ‘if Location Mode is Away’. Again that would mean the automation is triggered on departure too which may cause issues if you have more complex conditions so you set it as a ‘precondition’.

Thank you. I think I have it figured out now.