Posted in

Track Your Parking Location in Home Assistant

Update: This article has been updated to use MQTT instead of the device_tracker.see service. The approach is more reliable and aligns with how Home Assistant handles device trackers in recent versions.


In our household, we have two cars. Our main car is a Kia EV6, which is integrated into our smart home through the Kia Connect Integration. Our second car is a Kia Picanto, a solid choice for short trips, but it lacks the smart connectivity available in the EV6. This guide shows you how to track its parking location anyway, using nothing more than your phone’s Bluetooth connection and a couple of Home Assistant automations.

What You’ll Need

  • Bluetooth connection with your car
  • The Home Assistant Companion app (Android / iOS) installed on your phone
  • An MQTT broker configured in Home Assistant (e.g. Mosquitto)

Why Track Your Parking Location?

Even without built-in smart features, it’s worth bringing a basic car into your home automation setup. After browsing online resources, I came across a simple approach: capture your phone’s GPS coordinates the moment Bluetooth disconnects from the car. Since that disconnect happens right as you step out and lock up, it marks exactly where you parked. The same technique works for any car with a Bluetooth audio system, not just the Picanto.

Tip: If you want to track the parking location for multiple drivers, you’ll need to repeat these steps for each person’s phone.

Step 1 – Tell Home Assistant Which Bluetooth Connections Are Available

  • Open the Home Assistant Companion app on your smartphone.
  • Go to App Configuration > Sensors.
  • Search for “Bluetooth,” then find and enable the Bluetooth Connections sensor.
  • After enabling, a sensor named something like sensor.<your_device>_bluetooth_connection will appear. This sensor shows all connected Bluetooth devices.

Step 2 – Create a Template Sensor That Detects Connection to Your Car

Next, create a template sensor to detect whether your phone is currently connected to the car’s Bluetooth. Replace the MAC address and device name below with your actual details. You can find the MAC address in your phone’s Bluetooth settings while the car is connected.

template:
  - sensor:
      - name: "Picanto Bluetooth (Peter)"
        unique_id: picanto_bluetooth_peter
        icon: mdi:car
        state: >-
          {{
            'XX:XX:XX:XX:XX:XX (Kia Motors)'
            in state_attr('sensor.phone_peter_bluetooth_connection', 'connected_paired_devices')
          }}

Step 3 – Create an Automation to Save the Parking Location When Bluetooth Disconnects

This automation triggers when your phone disconnects from the car, recording your GPS location at that moment:

- id: car_parking_location_picanto
  alias: "Auto: Parkeerlocatie Picanto"
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: sensor.picanto_bluetooth_peter
      from: "True"
      to: "False"
  variables:
    lat: "{{ state_attr('device_tracker.phone_peter', 'latitude') | float }}"
    lon: "{{ state_attr('device_tracker.phone_peter', 'longitude') | float }}"
    zone: "{{ state_attr('device_tracker.phone_peter', 'zone') | default('not_home') }}"
  action:
    - action: mqtt.publish
      data:
        topic: "car/picanto/location"
        payload: >
          {
            "latitude": {{ lat }},
            "longitude": {{ lon }},
            "gps_accuracy": 15
          }
    - action: mqtt.publish
      data:
        topic: "car/picanto/state"
        payload: "{{ zone }}"

This publishes your location to an MQTT topic, which Home Assistant picks up via an MQTT device tracker to create or update the device_tracker.picanto entity. It also publishes your current zone (e.g. home or not_home) as a separate state topic.

Step 4 – Configure the MQTT Device Tracker

To turn the MQTT messages into a proper device tracker entity, add the following to your MQTT configuration. This tells Home Assistant which topics carry the location and state data, and registers the car as a device in your system:

mqtt:
  device_tracker:
    - name: "Picanto"
      unique_id: "picanto_tracker"
      icon: "mdi:car"
      source_type: gps
      state_topic: "car/picanto/state"
      json_attributes_topic: "car/picanto/location"
      device:
        identifiers:
          - "your_license_plate"
        manufacturer: "Kia"
        model: "Picanto"
        name: "Kia Picanto"

After reloading your MQTT configuration, Home Assistant will create the device_tracker.picanto entity. Every time the automation publishes a new location, this entity updates automatically.

Step 5 – Show the Parking Location on Your Dashboard

Once the device_tracker.picanto entity is active, you can display it on a Home Assistant map card. Add a map card to your dashboard and set the entity to device_tracker.picanto. Home Assistant will show a pin at the last recorded parking spot, so you can see at a glance where the car is without opening a separate app.

You can take it further by adding a notification: trigger an alert when the car enters the home zone, so the rest of the household knows the car is back without anyone needing to check manually.

Conclusion

With two automations and a Bluetooth sensor, a car without any internet connectivity can still show up on your Home Assistant map. The parking location stays up to date automatically, and you never have to guess where it was left. It is also a good example of how much you can do with just the Companion app sensors: Bluetooth state alone is enough to build something genuinely useful. If you have a second car without built-in connectivity, this is one of the easiest integrations you can add to your setup.

Related guides:
Smart Charging My EVs with EVCC — how I manage charging for the EV6 using solar surplus and dynamic pricing.
Smart Travel Time Notifications in Home Assistant — get accurate ETAs sent to your phone when it’s time to leave.

2 thoughts on “Track Your Parking Location in Home Assistant

  1. Since Bluetooth is not visible due to iOS security measurements, I looked at a different solution. You can find the SSID of you device, so I have altered & implemented the above script by replacing the bluetooth template by a version that looks for SSID. Thanks for the nice tutorial.

Leave a Reply

Your email address will not be published. Required fields are marked *