Q: Device tracking using device alias possible?

I am using device tracking to detect if my family members are at home or not.

Principle set-up:

  1. HA integrated to Unify AP
  2. known_devices.yaml configured to show each persons mobile device with an alias mapping device name to person
  3. Defined a “family” group in group.yaml with the device name of the devices listed in #2
  4. Family group panel shown in GUI with the name of each family member

Since the device tracking design in HA changed, my known_devices mapping seems to be disregarded. Instead of the family members names like before, the tracking now shows the internal HA device names instead.

Question: How can I configure device tracking to show the name of the family member in the GUI panel instead of the internal device name? E g Show “Adam” instead of “adam_s_oppo_mobile_2”.

Snippet from configuration.yaml
device_tracker:

Integrate with local Unifi Controller

  • platform: unifi
    host: x.x.x.x
    username: !secret unifi_username
    password: !secret unifi_password
    verify_ssl: false
    interval_seconds: 30
    consider_home: 120
    site_id: default
    new_device_defaults:
    track_new_devices: false
    hide_if_away: false

Snippet from groups.yaml
family:
name: Family
entities:
- device_tracker.adam_s_oppo_mobile_2
- device_tracker.andini_s_samsung_galaxy_a8_2
- device_tracker.galaxy_a50_2
- device_tracker.jimmy_s_samsung_galaxy_a5_mobile_2
- device_tracker.octa_s_oppo_mobile_2

Snippet from known_devices.yaml

Monitored Devices

adam_s_oppo_mobile_2:
hide_if_away: false
icon:
mac:
name: Adam
picture:
track: true

galaxy_a50_2:
hide_if_away: false
icon:
mac:
name: Aira
picture:
track: true

octa_s_oppo_mobile_2:
hide_if_away: false
icon:
mac:
name: Octa
picture:
track: true

andini_s_samsung_galaxy_a8_2:
hide_if_away: false
icon:
mac:
name: Andini
picture:
track: true

jimmy_s_samsung_galaxy_a5_mobile_2:
hide_if_away: false
icon:
mac:
name: Jimmy
picture:
track: true

Just add the devices to the person definition…??

Haven’t been using Person before.

In my family group, would I use the person entity instead of the device tracker one?

My main objective is to show each member of the family group’s home status.

Yes. You can add device_tracker to the person and use that for notifications.

I don’t track my wife either but use a ping tracker for when she connects to Wifi to trigger an automation and it works really well and reliably.

Tried it and it work perfect. Thx David!

1 Like