Set a person's location via input_number

Hello everyone,
I created a person named Mazda_3 in Home Assistant. This person should represent the location of my car. The coordinates (latitude and longitude) come from two input_number entities:

input_number.mazda_location_latitude

input_number.mazda_location_longitude

I created an automation that should update the person’s location when these coordinates change:

alias: Mazda Standort aktualisieren
trigger:
  - platform: state
    entity_id:
      - input_number.mazda_standort_latitude
      - input_number.mazda_standort_longitude
action:
  - service: person.set_location
    data:
      person_id: person.mazda_3
      latitude: "{{ states('input_number.mazda_standort_latitude') | float }}"
      longitude: "{{ states('input_number.mazda_standort_longitude') | float }}"
      gps_accuracy: 10
mode: single

But the location isn’t recognized.

Does anyone know a solution or an alternative?

Thanks in advance for your help :slight_smile:

You can’t just make up actions.

You need to add a device_tracker to the person and use the device_tracker.see service. https://www.home-assistant.io/integrations/device_tracker/#device_trackersee-action

Thank you so much for the quick and helpful solution!

I’m really sorry I didn’t see or understand it. I’m still new to Home Assistant, but I’m really enjoying it so far.

Thanks again for the help!

I suspect you used AI to create that automation because you’re new but that syntax is old (from the AI training data), and AI is known for making up services / actions that don’t exist.

Tip: don’t try to use AI for HA configuration.

1 Like

Yes, you’re right, I tried reading the documentation. But for me, with less experience, it’s difficult.

Feel free to ask the questions here on the forum instead. We won’t bullshit you — as much :slight_smile:

2 Likes