Skip to content

BMW device tracker - fix toggling state if vehicle tracking is disabled#12999

Merged
MartinHjelmare merged 2 commits intohome-assistant:devfrom
ChristianKuehnel:bimmer_fix_tracker
Mar 30, 2018
Merged

BMW device tracker - fix toggling state if vehicle tracking is disabled#12999
MartinHjelmare merged 2 commits intohome-assistant:devfrom
ChristianKuehnel:bimmer_fix_tracker

Conversation

@ChristianKuehnel
Copy link
Copy Markdown
Contributor

@ChristianKuehnel ChristianKuehnel commented Mar 9, 2018

Description:

If remote tracking is disabled in the vehicle, the position was toggling in the device tracker. Now, the position in the device trackier is only updated if remote tracking is enabled.

Related issue (if applicable): fixes ##12698

Pull request in home-assistant.github.io with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):

no changes

Checklist:

  • The code change is tested and works locally.

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

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@ChristianKuehnel ChristianKuehnel changed the title WIP - BMW device tracker - fix toggling state if tracking is disabled WIP - BMW device tracker - fix toggling state if vehicle tracking is disabled Mar 9, 2018
@ChristianKuehnel ChristianKuehnel changed the title WIP - BMW device tracker - fix toggling state if vehicle tracking is disabled BMW device tracker - fix toggling state if vehicle tracking is disabled Mar 18, 2018
@ChristianKuehnel ChristianKuehnel deleted the bimmer_fix_tracker branch March 18, 2018 09:22
@gerard33
Copy link
Copy Markdown
Contributor

@ChristianKuehnel Was wondering why this PR is closed as this will be a solution to prevent toggling of the device tracker when remote tracking is disabled?

@ChristianKuehnel ChristianKuehnel restored the bimmer_fix_tracker branch March 27, 2018 21:37
@ChristianKuehnel
Copy link
Copy Markdown
Contributor Author

Honestly I have no idea. I guess I closed the wrong ticket...

@ChristianKuehnel ChristianKuehnel changed the title BMW device tracker - fix toggling state if vehicle tracking is disabled BMW device tracker - fix toggling state if vehicle tracking is disabled - WIP Mar 27, 2018
This fixes an issue with a toggling vehicle state.
@ChristianKuehnel ChristianKuehnel changed the title BMW device tracker - fix toggling state if vehicle tracking is disabled - WIP BMW device tracker - fix toggling state if vehicle tracking is disabled Mar 28, 2018
@ChristianKuehnel
Copy link
Copy Markdown
Contributor Author

Do we really need all of the different name attributes of the tracker? I just used the pattern I saw in tesla, but I'm not sure if that really makes sense:
https://github.com/ChristianKuehnel/home-assistant/blob/351bc62f4aa9fe3d5328f7f72883e733c3c63db8/homeassistant/components/device_tracker/bmw_connected_drive.py#L52-L54

@MartinHjelmare
Copy link
Copy Markdown
Member

Attributes are optional. dev_id is required and host_name nice to set to get a friendly name in the frontend. Each integration can add additional info in attributes that relate to the state of the device.

@MartinHjelmare
Copy link
Copy Markdown
Member

Let me know when to merge.

@ChristianKuehnel
Copy link
Copy Markdown
Contributor Author

ChristianKuehnel commented Mar 30, 2018

@MartinHjelmare Thx for the review and the hint. I removed the attributes as they are redundant...

Ready to be merged.

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare MartinHjelmare merged commit 979a8f8 into home-assistant:dev Mar 30, 2018
@balloob balloob mentioned this pull request Apr 13, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants