Naming of Owntracks regions / HASS zones

I’ve been using Home Assistant for a few months now and it’s absolutely fantastic - I love it!

I use Owntracks to keep track of myself and my partner throughout the day. I find that sometimes Home Assistant does not correctly display the name of the zone that we’re in. Here’s an example:

Whilst Dom’s zone name is displayed correctly, I should be in a zone called Work (Chris), not work chris.

In Owntracks, the regions are named work_chris and work_dom on both of our devices.

In the HASS configuration, I include a file called zones.yaml which contains the following:

- name: Work (Chris)
  latitude: !secret WORK_CHRIS_LATITUDE
  longitude: !secret WORK_CHRIS_LONGITUDE
  radius: !secret WORK_CHRIS_RADIUS
  icon: mdi:factory

- name: Work (Dom)
  latitude: !secret WORK_DOM_LATITUDE
  longitude: !secret WORK_DOM_LONGITUDE
  radius: !secret WORK_DOM_RADIUS
  icon: mdi:pharmacy

Is anyone able to tell me why HASS does not display my current zone as Work (Chris), and instead displays work chris? I am guessing I’ve probably just messed up the naming convention somewhere - either Owntracks or my zones.yaml file.

I tried changing the name of the Owntracks region from work_chris to Work (Chris) and then updating my location, but this had no effect.

Here’s how the States page looks for the two devices:

Thanks in advance for your help!

Chris

You might be able to adjust this by adding ‘friendly_name’ to the zone entry.if that doesn’t work you might be able to create entry in customize.yaml for zone.chris_work and then add friendly_name

Hi Keith, thanks for your reply, it works! I don’t know why I didn’t think of it.

I added the following to my customize.yaml file and it all works exactly as it should :slight_smile:

zone.work_chris:
  friendly_name: Work (Chris)

zone.work_dom:
  friendly_name: Work (Dom)

(For reference, adding a friendly_name attribute to the zone entities did not work.)

Best regards,

Chris

OK, it looks like I was a little premature in accepting Keith’s solution as correct.

After a short while the zones displayed in Home Assistant reverted to the non-formatted names (so what was Work (Chris) reverted to work chris).

I feel like there’s simply some sort of inconsistency in the way HASS handles the names of the zones. It doesn’t seem to matter whether I call the Owntracks region OR the Home Assistant zone entity work_chris, work chris or Work (Chris), it still appears in the Home Assistant States listing as zone.work_chris, and it still eventually reverts to dislaying work chris in the main Home Assistant screen.

Does this sound like it might be a genuine issue that should be logged on GitHub?

Thanks,

Chris

from: https://www.home-assistant.io/components/device_tracker.owntracks/

Owntracks can track regions, and send region entry and exit information to Home Assistant (HA). You set up a region in the Owntracks app which you should name the same as your HA Zone, and then make sure to turn on the share option for the region in the owntracks app.

Thank you for your response. Do you know how to turn on the share option in the app for the region? I couldn’t find any settings that does that.

I would assume Regions > Publish Waypoints (top right), not using that function. You may also need to report extended data (Settings > Reporting > Extended data).
More info here: https://owntracks.org/booklet/features/waypoints/