Auto turn on lights when you get home by WiFi?

Anyone can help me figure out how to automatically turn on my lights when certain phone connects to WiFi? Or if no one is home turn on the front light at dark?

This is a pretty vague question, do you need help with the automation, or what components/hardware are needed to set this up?

Do you have a device tracker setup to track devices on your WiFi?

Have you read the automation docs?

The first two automations in the link below can be used for inspiration for what you are trying to accomplish. Replace the trigger in the second with a device_tracker coming home and you are all set.

1 Like

The Automation part. I currently have the TP-Link light switches with Unifi APs. I linked the Unifi AP so I can see my WiFi devices.
I’m not sure how to configure it turn on when certain devices connect to the WiFi. The WiFi reaches the drive way so my phone connects when I get home.
Also I would like to automatically turn on my dogs light if no one is home.
Any better way to do this? Open to recommendations

1 Like

For the dogs light, see the first example I linked. Replace your switch entity in the action section and you are good to go.

As for turning a light on when you arrive home look into triggering on that state change.

What are the entity ids you want to trigger off of? What is the entity id of the light you want to turn?

Have you read the automation docs? Have you tried to write the automation yourself?

It’s much better in the long run if I teach you to fish rather than just give you the fish :wink:

Use a device tracker that can detect if one of those devices is home. It’s worth reading some of the articles on doing presence detection well.

The same presence detection works here.

As @tinkerer says, once you’ve set up device_tracker this is about as basic as it gets, just a load of and/or triggers and conditions. Worth reading everything as he advises, have a go and if it still doesn’t work come back with the code as far as you’ve got and you’ll get some specific help which will push you over the line.