device tracker doesn't properly support lists
This format doesn't work properly:
device_tracker:
- platform: x
- platform: y
track_new_devices: False
In fact, track_new_devices will be the default, True, for platform y. Only the first platform in the list will be respected in terms of the attributes track_new_devices, consider_home, and home_range.
The options right now It will look for the configuration options for the device tracker in the first platform and they will apply to all. I agree that it should be organized differently, probably with a subkey:
device_tracker:
track_new_devices: False
consider_home: 60
interval_seconds: 12
platforms:
- platform: x
It shouldn't be too hard to make that backwards compatible.
I prefer platform-specific settings. I might want to only track new devices on a subset of platforms. For example, I always want to track new devices that show up on Owntracks, but definitely not on my router.
I agree. A PR is welcome :+1:
From reading the current documentation this appears to be solved. is that correct?
In my experience it is not solved. I normally use owntracks and snmp device tracker. When I enable BLE tracking the device state is switching present / not present faster than the set "consider_home" so I think the issue is still there.
@kirichkov can you post the relevant portion of your config file?
configuration.yaml
device_tracker:
- platform: owntracks
max_gps_accuracy: 200
track_new_devices: false
interval_seconds: 60
consider_home: 180
waypoints: False
- platform: snmp
host: !secret snmp_host
community: !secret snmp_community
baseoid: 1.3.6.1.2.1.4.22.1.2.7
interval_seconds: 60
- platform: bluetooth_le_tracker
consider_home: 180
track_new_devices: false
interval_seconds: 60
known_devices.yaml:
georgi_phone:
name: Georgi
mac: AA:BB:CC:DD:EE:FF
track: yes
hide_if_away: no
georgi_phone_ble:
name: Georgi BLE
mac: BLE_AA:BB:CC:DD:EE:FF
track: yes
hide_if_away: no
For testing purposes I split the configuration into two devices, because otherwise I'd constantly be marked as "not home" and leaving/entering.
P.S.: I must admit I tested this last on 0.29, but I don't see anything in respect to device tracker in 0.30
I haven't either, so this appears to still be valid, thanks,
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Issue still relevant in 0.40.1.
Can we make the docs more clear other this, it currently reads like it is per platform and then says it is not, it may confuse skim reading users,
Also this needs to be a per platform thing, as i may want new own track devices tracked, but not all of the ones on snmp as i may use it to improve home detection
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍