ESP32 Proxy & Listener

I am a newbie and would firstly like to know how to add two ESP32’s to Home Assistant. I plan to keep one in the Garage and the other in my Car and then determine the proximity of either if the car is coming home or driving away to either open or close the garage door to which I have already connected a sensor that I am already able to access in Home Assistant

I would suggest using ESPHome.

Some getting started information: Getting Started with ESPHome and Home Assistant - ESPHome - Smart Home Made Simple

How do you plan on using the ESP devices? Plan on using bluetooth or something else?

Yes I have ESPHOME… Not sure what next…:disappointed:

Not sure… What are the options???

Wouldn’t simple on_connect / on_disconnect approach work here?

Haha well sounds like almost everyone here you pass through the X-Y problem: XY problem - Wikipedia.
The gist of it comes down to troubleshooting or focusing on ESP instead of what you want to achieve. Don’t worry though we’ll get there.

So the core of what you want to do is open the garage door when coming near it. There are some ways of achieving that, one of them might be creating an area of your house and if you approach it (with the HA Companion app), it automatically opens the garage. The part of how you do the opening part might be though ESP.

You can also do what Karosm is saying and using a function where once the ESP senses a Wifi or Bluetooth connection (different approach) it opens the garage.

The first option is the easiest, the second one the most ESP ‘intense’ but still relatively easy. Using the Bluetooth of your phone and not a second ESP in your car is going to make it slightly more complex but perhaps also safer as it will only trigger if the car is coming near the garage.

Some info:
Have ESP open your garage door by commanding two relays: Simple Garage Door - ESPHome - Smart Home Made Simple

Similar question in the forum: ESP Automations

Action documentation of ESPHome: (search for ‘connect’) Actions, Triggers, Conditions - ESPHome - Smart Home Made Simple