Hey everyone, I’ve been tinkering with Home Assistant lately and wanted to share my experience and a cool feature I managed to set up. I’ve been trying to get a map card to show the location of our car, but only when it’s within our home zone. The goal was to keep track of where the car was parked without constantly tracking its movements, which could be a privacy concern.
I started by setting up a device tracker for our car using its GPS coordinates. That part was straightforward, and I could see the car’s location on a map. The challenge came when I wanted to make the map card appear only when the car was within our predefined ‘home’ zone. I didn’t want the map to be visible when the car was out and about, just when it was parked at home.
After some research and trial and error, I found a solution using automations and templates. I created an automation that checks the car’s location and updates a sensor state accordingly. If the car is within the home zone, the sensor state changes, and the map card becomes visible. If it’s outside, the map card hides. This way, I can easily see where the car was last parked without worrying about constant tracking.
The process involved setting up a zone in Home Assistant, configuring the device tracker, and then using a template to control the visibility of the map card. It took some time to get the conditions right, especially figuring out how to reference the device tracker’s state and location data. But once everything was set up, it worked like a charm!
I’d love to share my configuration files if anyone is interested in replicating this setup. It’s a neat way to balance convenience with privacy. If you have any questions or suggestions, feel free to drop a comment below! ![]()