core icon indicating copy to clipboard operation
core copied to clipboard

device tracker doesn't properly support lists

Open happyleavesaoc opened this issue 10 years ago • 13 comments

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.

happyleavesaoc avatar Feb 19 '16 01:02 happyleavesaoc

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.

balloob avatar Feb 19 '16 06:02 balloob

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.

happyleavesaoc avatar Feb 19 '16 13:02 happyleavesaoc

I agree. A PR is welcome :+1:

balloob avatar Feb 19 '16 16:02 balloob

From reading the current documentation this appears to be solved. is that correct?

Spartan-II-117 avatar Oct 10 '16 22:10 Spartan-II-117

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 avatar Oct 11 '16 06:10 kirichkov

@kirichkov can you post the relevant portion of your config file?

Spartan-II-117 avatar Oct 11 '16 06:10 Spartan-II-117

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

kirichkov avatar Oct 11 '16 13:10 kirichkov

I haven't either, so this appears to still be valid, thanks,

Spartan-II-117 avatar Oct 11 '16 17:10 Spartan-II-117

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:

balloobbot avatar Mar 17 '17 15:03 balloobbot

Issue still relevant in 0.40.1.

brahmafear avatar Mar 21 '17 18:03 brahmafear

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

miawgogo avatar Apr 26 '17 02:04 miawgogo

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:

balloobbot avatar Aug 12 '17 21:08 balloobbot

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 👍

balloobbot avatar Sep 04 '17 23:09 balloobbot