Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

track_new_devices: false not honored #14964

Closed
boojew opened this issue Jun 15, 2018 · 11 comments
Closed

track_new_devices: false not honored #14964

boojew opened this issue Jun 15, 2018 · 11 comments

Comments

@boojew
Copy link
Contributor

boojew commented Jun 15, 2018

Home Assistant release with the issue:

0.71.0 (rc)

Last working Home Assistant release (if known):
Unknown

Operating environment (Hass.io/Docker/Windows/etc.):

Docker

Component/platform:

Unifi WAP https://www.home-assistant.io/components/device_tracker.unifi/

Description of problem:
The "track_new_devices: false" is not being honoured. I have tried with the following two variations

  - platform: unifi
    host: skywarp
    username: !secret unifilogin
    password: !secret unifipassword
    verify_ssl: false
    track_new_devices: false

  - platform: unifi
    host: skywarp
    username: !secret unifilogin
    password: !secret unifipassword
    verify_ssl: false
    new_device_defaults:
      track_new_devices: false

And in both cases new devices are added to my known_devices file and being tracked. Seems to be a similar issue to #11184

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):


Additional information:

@point-4ward
Copy link
Contributor

Please show your whole device tracker section with formatting.

Items will still be added to known devices in any case.

@boojew
Copy link
Contributor Author

boojew commented Jun 15, 2018

Got it - and thats what I assumed, but I wanted to be sure. They are always added, and "track: true" is always added - no matter what my config.

This is my complete device_tracker config

device_tracker:
  - platform: automatic
    client_id: !secret automatic_client
    secret: !secret automatic_secret
  - platform: unifi
    host: skywarp
    username: !secret unifilogin
    password: !secret unifipassword
    verify_ssl: false
    new_device_defaults:
      track_new_devices: false

@dshokouhi
Copy link
Member

@boojew if you look at the device_tracker docs you will see that the values are read from the first configured device tracker which in this case is automatic try to change the positioning of the 2 platforms to see if that helps. The devices will still show up in known_devices.yaml but it should be set to track: false

https://www.home-assistant.io/components/device_tracker/

@point-4ward
Copy link
Contributor

^ what he said.

@boojew
Copy link
Contributor Author

boojew commented Jun 19, 2018

Yes, that solved it. I misunderstood what "However device tracker will only look for global settings under the configuration of the first configured platform" meant. In hindsight, it is clear... but this is not intuitive, but I assume there is a good reason for this

@forkineye
Copy link

For sanities sake, how are we to know this is a global setting since it's nested under the platform? Or am I missing something obvious?

@point-4ward
Copy link
Contributor

... By reading the docs.

But you're right, it's not very intuitive.

@forkineye
Copy link

I looked at the docs, but nowhere does it state this is a global setting. Or are we to assume it's global since it's listed in https://www.home-assistant.io/components/device_tracker/ and not https://www.home-assistant.io/components/device_tracker.unifi/? My assumption was that it would be an inherited setting and local to the platform. Just trying to wrap my head around it to avoid future confusion.

@point-4ward
Copy link
Contributor

On the first page you linked to, under the heading "Configuring a device_tracker platform"...

The following optional parameters can be used with any platform. However device tracker will only look for global settings under the configuration of the first configured platform:

@forkineye
Copy link

Again though, it states those are optional parameters. Doesn't say anything about which ones are global. Are they all global?

@point-4ward
Copy link
Contributor

Just the ones that follow that paragraph, that's why it says the following parameters.

@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants