Known_devices.yaml - which items can be modified?

added after my initial post:
could this have something to do with nmap?
the dev-state page shows all items as follows
device_tracker.00044bxxxxxx


Which items in known_devices.yaml can be modified to make working with items more manageable?
I could have sworn I’ve had success with changing lines 1 and 4 below

before

00044bxxxxxx:
  hide_if_away: false
  mac: 00:04:4B:xx:xx:xx
  name: 00044bxxxxxx
  picture:
  track: true
  vendor: NVIDIA

after

nvidia_shield:
  name: Nvidia Shield
  hide_if_away: false
  mac: 00:04:4B:xx:xx:xx
  picture:
  track: true
  vendor: NVIDIA

Today I added a device and it created an entry with the MAC address as the entries for lines 1 and 4.
I cleaned it up as in my after above but when I restarted HASS, it created a duplicate using the MAC address.

Did something change with the latest version?

What items are safe to make the items for readable?

thanks

Hello,

I’m a newbie with HA (I started 2 days ago) but I do have the same issue. As soon as I edit the file and change something (in my case I was just adding the “name:” field) duplicates are created.

I always change both the entry name and the Name value. I didn’t have any problem of duplicate entry.

However I didn’t change the order of the entry, maybe that’s what’s causing your problem?

Speaking of known_devices, I’m having a problem with a device that got assigned a new IP from DHCP and now it’s showing up as “not_home”. I tried changing the first line entry from the old IP of 1921681242: to 1921681250: but there’s no change in the state.

Is there any way to get nmap in HA to update it? If I run NMap from the command line, it sees the device fine.

I’ve thought about renaming the known_devices.yaml and restarting to see if it regenerated but I’m concerned about the implications.

NMap base the detection on the mac address and doesn’t write the ip in known_devices.yaml
As long as you don’t modify the mac address and don’t set track: false, it should work.

Which is why this is so confusing. Obviously the mac didn’t change and the only thing I changed in known_devices.yaml was the IP that was displayed to the proper one.

1921681250:
  name: AcuRite_WX_station
  mac: 24:C8:6E:04:3B:9C
  picture:
  track: yes
  hide_if_away: no

Here’s the device showing up in my port scanner with the correct IP and mac (Note that this shows an http port is open on port 80, which is a port that NMap would typically scan by default):

And here’s the entry in dev states:

Here’s my NMap setup:

#
# Presence Detection/Location
#
device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.1.1/24
    home_interval: 5
    scan_options: " -PS135,445 --host-timeout 5s "
  - platform: owntracks
    max_gps_accuracy: 100
  - platform: automatic
    client_id: !secret automatic_client_id
    secret: !secret automatic_secret
    username: !secret automatic_user
    password: !secret automatic_PW

I removed my known_devices.yaml so it can get rebuilt.
Now when I stop and start HASS, it keeps duplicating all items.

I’ve restarted it 3 times and now I have 3 copies of all entries.


Has anyone else had the issues I’m describing?

I have a lot of automation and scripts created using certain names but when I modify the known_devices.yaml, it duplicates the entries with the discovered info.

Yes. I just installed Home Assistant, using the hassbian image. I hadn’t used it before and I was disappointed that this feature doesn’t work. I get the same problem: Home Assistant adds every network device nmap sees every time it is restarted, so the edits I make to the file (friendly name and track yes/no) are ignored.

same challenge here - anyone?

experiencing the same issue here.

Renaming of nmap device tracker entities causes duplicate entries each time HASS is rebooted

Been using hassio for a while now and things were getting hard to follow so tried to do a tidy up and get some more logical names and a common naming convention to help.

Tried to tidy up the known devices.yaml and now getting the duplicate items.

Did anyone manage to find the answer.

Did those items have mac addresses?

The duplicate items have the same Mac addresses as other items in the list.

check the entity registry then. You should be able to name them in both places without an issue:

https://www.home-assistant.io/docs/configuration/entity-registry/

Is it possible to use a filter in the mac address field? My son has an Umidigi phone and it doesn’t have a set mac address. Chinese phone assigns itself a new mac on every reboot (or reconnect so it seems). It’s up to 20 addresses now in the known devices file…