Device_tracker: new_device_defaults should accept all device options

Hi there,

I just tried to configure a default icon for new devices of the device_tracker. This got rejected as “icon not allowed”. I checked here: https://github.com/home-assistant/home-assistant/pull/10762/files. And it seems, only two options are implemented as defaults. Is that by design? Otherwise, I suggest it be extended to allow the full set of configurations.

Best
Andreas

PS: Thanks for this nice piece of software. I’m still getting started…

+1 agreed.

I think the ‘global options’ being put under one of the platforms is illogical anyway.

Should be more like:

device_tracker:
  track_new_devices: false
  other_global_options_1: true
  other_global_options_2: false
  trackers:
    - platform: bluetooth_tracker
    - platform: nmap 
      hosts: 192.168.1.0/24
    - [etc] 

IMHO

I’m not sure. I could imagine, different platforms (or actually trackers) to have different defaults. Say, e.g., nmap means someone is in my sacred home network. I would want to see that someone. However, bluetooth could also capture my neighbour being at home on the other side of the wall. I would like to have these devices hidden by default… In order to have these possibilities, I (personally) would accept having to declare the defaults multiple times.

Yes, but the current implementation sets them globally from the first one you declare. So if you set Bluetooth with one lot of defaults, and then below it set nmap with different options the nmap ones will be ignored.

Hence why I think the current format is illogical.

Then if it was done like that you could potentially override the default on a per tracker basis, which would be much better for the reasons you outline.

Oh, I didn’t see the (what I would call) bug, that the first platform defines Options for all following. You’re right. That sounds illogical!

And +1 for the idea of defaults and then overriding in specific platforms…

+1 for the idea of global and overriding implementation defaults…
That “bug” explains some of my confusion…