Automation for Home Monitoring

I want ST to turn on a few lights if a door/window is opened in “Stay” mode or if a door/window or motion sensor is triggered in “Away” mode. I tried creating an Automation but don’t see a way to select all sensors in the “If” section of the Automation. It only allows me to select a single sensor.

Am I missing something, or is there another way to do this?

You can add multiple if statements. Add the first sensor you want to include then hit the + next to the If to add further sensors.

I believe that it only triggers the alarm only if all the additional sensors are opened, not if any one is open.

You can set lights to come on under "response " in STHM but it would apply equally to both home and away modes. However if the motion sensor in question is only active in away mode then this would trigger as required.
Other than that you would need to set up multiple automations or use webcore.

1 Like

You need to use location mode as a pre condition, then select all of the sensors and select “when any condition below is met”. I do this to automatically turn off my ac/heat if any window opens.


Using the location mode as a pre-condition like @saosinx88 advises is the way to go since Location Mode can be used as a pre-condition while the STHM security modes cannot be set as a pre-condition.

Just ensure that the location mode is setup to follow the STHM security mode. Example: when in Armed Stay mode then the location mode is Night, when in Armed Away mode then the location mode is Away, and when in Disarmed mode then location mode is Home.

Also, the Smart Lighting SmartApp is what I use with the Location Modes as a condition since Smart Lighting is much easier to select multiple devices (of the same type) all at once compared to Automations where devices have to be added one at a time.

1 Like

Thank you for your great advice. I set the Location mode and sensor triggers as you suggested. Is there something else I need to do to include this part of your instructions, “ensure that the location mode is setup to follow the STHM security mode”? How does the Location mode get set? Does the Member Location setting come into play?

Do you use any triggers for STHM? For my house, I have a morning automation at 4 am to turn on the coffee maker, turn on a few interior and exterior lights and set the location mode from Night to Home and for STHM to disarm. When both my wife and I leave, the mode changes to Away and STHM switches to Armed (Away). Either of us returning switches it to disarmed and the mode to Home. When we go to bed at night, we either tell Alexa goodnight, which triggers a routine to control a simulated switch or we press a button. That simulated switch or button press then triggers an automation in ST to change the mode to Night, turn off all the lights, lock the doors, and puts STHM in Armed (Stay).

Create 3 Automations to have STHM follow with location mode changes , like so:

I’m after the same kind of automation for my house. Is the location in your automation set by the location of your phone or some other method? Mine isn’t working at all even though it has permissions set.

Also is the location mode based on where you are the same one used in the automations as a precondition or are there different location modes. Per The earlier instructions, I need to use location mode in order to have the ability to trigger the alarm if one of several sensors is opened.

My wife and I use Life 360. The reliability is much better than ST presence in my opinion.

1 Like

Great. Thanks! I added the three automations you suggested.

In Away mode, my motion sensors don’t set off the alarm even though they are listed devices in the Automation and set to trigger with any motion. Opening a door or window triggers the alarm as expected. Any ideas?

How do you have STHM setup for your armed (away) sensors?

STHM, settings cog, security, set up armed (away) sensors, motion sensors.

I don’t personally use motion sensors because of animals, but that’s where you need to be setting them up.

The Away mode is set to use all motion sensors. I set this up using the same screen you showed. Just tested it and it now works. Crazy

Based on your suggestion I’m looking at Life360 and Google Maps location sharing, which seems to be able to do the same thing. The feedback I’m getting is that it uses a lot of phone battery, and you are not able to use a power saving mode on the phone with these apps. Does that work okay for you?

Glad to hear it’s working now.

I don’t use power saving mode, personally. But here is the rundown of Life 360. Says it’s used 3% of my battery since last charge.

1 Like

Ok. Thanks for all your help.

Thank you Mark for posting up this scenario… Just reading through the replies I am learning a lot! Cheers

Very cool.