Automation question with presence detection

Hello I have a question regarding automation that I cant wrap my head around. I know what I want to happen but little unsure how to accomplish this. I should start off by saying that I am using my ubiquity AP as presence detection. I am trying to turn on a set of lights when either my of the TWO iphones connects to the wifi. The expectation is that I dont want it to turn on when a single person gets home while the other person is already home as that would be pointless. If nobody is home and then one of the two arrives turn on lights.

I have the trigger portion down its basically trying to use AND or OR in the conditions which I am unsure of. I should also note that so far I am configured everything through the WebUI without having to manually add anything to my configuration.yaml file or automation.yaml

Now I am not asking for the fish here just some guidance on how to catch this fish :slight_smile:

Sometimes when you think of something too long you begin to get foggy.

Thank you

Hi :slight_smile:
You can create a group with both phones in it.
When nobody’s at home the group will be “away”.
When one will come home, one phone will be home and the other away and the group will be home !
Then if you base the trigger of your automation on the group state, even when the second phone will come home, the group state won’t change (it’s already home because one of the phones is already home !)
Enjoy :wink:

This is perfect !! the logic at first didnt make sense because how the heck would I have known by having one entity active in the group will cause the full group to be home but I will give it a try right now and report back :slight_smile: Thank you !!!

:slight_smile:

Worked like a charm !! Thanks again

1 Like