Unlock the Magic: Automatically save your car's parking position
Let's explore what you need to automatically save your car's parking position.
TUTORIAL


It's December 2022 and the cosmic tides align as Google's Android Auto opens its gates to IoT apps, paving the way for a new era of possibilities.
Just like the flux capacitor in the iconic film "Back to the Future", December 2022 became a pivotal moment in time.
It marked the acceptance of IoT apps into the Google's Play Store, setting the stage for a future where Home Assistant would transcend the ordinary.
Fast forward to January 2023 and the Home Assistant App becomes available for Android Auto too, unveiling the Android Auto sensor with the official 2023.1.1 version of the App.
Like a guardian of temporal coordinates, this sensor is your key to unlocking the magic of automatically save your car's parking position.
Join me on this mystical journey as we explore how the fusion of Home Assistant and Android Auto brings a touch of cinematic wonder to your everyday drive.
Below I'm going to explain how to create a super cool feature to automatically save your car's parking position (address + latitude and longitude coordinates) whenever you are away from home and your smartphone is being disconneted from Android Auto.
This could be nice especially when you are in unfamiliar places and want to easily get back to your car.
Let's get down to the nitty gritty.
Hardware configuration
No specific configuration is required
Procedure
Here's what you have to do:
Enable the Android Auto sensor on your Home Assistant Android companion app
Please refer to this entity: binary_sensor.yoursmartphone_android_autoEnable the Geocoded location sensor on your Home Assistant Android companion app
Please refer to this entity: sensor.yoursmartphone_geocoded_locationConfigure the following input text helpers to be used to automatically save the car's parking position data (address, latitude and longitude):
Software configuration
Android Auto available on your car
Home Assistant Android companion app version equal to 2023.1.1 or greater
Home Assistant version equal to 2023.1.1 or greater. FYI I'm currently running the 2024.1.3
Mobile App integration configured. This integration allows the Home Assistant mobile app to connect to your Home Assistant core environment
The person entity defined. Here for more details
The zone "home" configured
Now that you have configured all the bricks, it's time to dive into the automations:
Some specifics about the code above:
AndroidAuto - Save Car Parking Position disconneting from Android Auto
The trigger is based on the state of the android auto sensor
The condition allows the execution of the actions if the person's entity is not at home
The action section is in charge to call the service input_text.set_value to store the address, latitude and longitude data into the input text helpers described above
AndroidAuto - Reset Parking Position data getting back to Home again
The trigger is based on the state of the person entity
The action section calls the service input_text.set_value to set to an empty value the address, latitude and longitude data related to the last parking's position
Having created the automations, the last step to do is configure a conditional card to get the car's parking position data being visible on your dashboard only when you are away from home:
You can type the code from the screen for free but, in order to help you save time and avoid making any mistake, I created a pack for these automations as well as conditional card so that you can just use it to set up everything super easily.
You can download the pack just for a price of a coffee and, in the meantime, you are supporting me to keep this blog alive! 🙏
I truly hope you found this new article helpful.
To stay ahead with the latest tips, tricks and in-depth guides, ensure you're subscribed to my newsletter about Home Assistant. By doing so, you'll be the first to know about my upcoming tutorials!
Not only that, but your newsletter subscription grants you access to all the previous articles, ensuring you don't miss out on any valuable insights.
Thank you for being a valued part of my community! 🚀✨