Use Template value as input for location tracking

Hi,

I am monitoring my automower via HomeAssistant.
I have there an entity called “device_tracker.automower_g_152302615160200415” with the following attributes:

{
  "source_type": "gps",
  "latitude": 46.981485,
  "longitude": 14.206335,
  "gps_accuracy": 0,
  "battery": 41,
  "status": "Cutting",
  "id": "automower_g_152302615160200415",
  "name": "Mähschweinchen",
  "icon": "mdi:robot",
  "vendor": "Husqvarna",
  "model": "G",
  "friendly_name": "Mähschweinchen"
}

The state is
home

I want to get this device shown on my map so I tried to bring it into a zone.

  1. I can see already the status “home” as it is within my “home” range. Maybe I can easily show it on the map?

  2. I tried to extract the LAT and LONG via a template value:

       automower_330_long:
          value_template: "{{ states.device_tracker.automower_g_152302615160200415.attributes.longitude }}"
    

    Now I have a sensor “sensor.automower_330_long” with “12.206013333333333” as state.
    But how can I get it now into a Zone as coordination value?

  3. If It is possible to get the coordination, would it be also possible to print a path?

Best Regards,
Johannes

I believe the map automatically removes devices from the display when they are in the home zone. You’d have to take your mower outside that zone to see it on the map. I don’t know that there’s anyway to prevent this.

Hi,

Can I reduce the radius of my home zone?

Br,
Johannes

@pnbruckner is correct, you cannot prevent the device_tracker from disappearing when in your home zone.

To adjust the size of your zone:

 # Example configuration.yaml entry
zone:
  - name: Home
    latitude: 32.8793367
    longitude: -117.2474053
    radius: 100 #<--- change this to adjust the size of your home zone.
    icon: mdi:account-multiple

I believe the units are meters.

Strange,
I am refering to that post, where the user has his automower devices tracked within the “home” location…

Straight from the Zone documentation:

So the guy in the thread must have a custom component or named finagled a way to make it work.