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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow name-only location updates for mobile_app device_tracker #62243

Conversation

zacwest
Copy link
Member

@zacwest zacwest commented Dec 18, 2021

Proposed change

Allows sending name-only updates to the device_trackers, for example to do home vs. not_home without exposing accurate location values.

Motivation here originates in multi-server support in the iOS app. We want to limit location exposure to some not-their-primary-server instances like a parent's or friend's instance.

I'm somewhat intentionally (rather than requiring one of the location_name/gps keys) including the ability to redact the device_tracker (no gps/location name) and get it into the 'unknown' state.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @robbiet480, mind taking a look at this pull request as it has been labeled with an integration (mobile_app) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@dshokouhi
Copy link
Member

We have also had this request in the android app where people dont want to report precise location but only zone names as well. One other thing we can do too with this change is to link wifi SSIDs to zones for users who do not have google services.

CC: @JBassett

@JBassett
Copy link
Contributor

We have also had this request in the android app where people dont want to report precise location but only zone names as well. One other thing we can do too with this change is to link wifi SSIDs to zones for users who do not have google services.

CC: @JBassett

I think it best to just start with zone only before worrying about SSID -> location mapping.

zacwest added a commit to home-assistant/iOS that referenced this pull request Dec 20, 2021
Requires home-assistant/core#62243.

## Summary
Allows sending exact locations (current behavior, gps coordinates), no locations (sets the device tracker to 'unknown' effectively), and zone-only locations (we send `home`, `other_zone_name` or `not_home` only).

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#639
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Jan 4, 2022
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @zacwest 馃憤

Dev automation moved this from Needs review to Reviewer approved Jan 4, 2022
@balloob balloob merged commit 2df8ab8 into home-assistant:dev Jan 13, 2022
Dev automation moved this from Reviewer approved to Done Jan 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core has-tests integration: mobile_app new-feature small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants