Skip to content

Fix MercedesMe - add check for unsupported features#12342

Merged
balloob merged 3 commits intohome-assistant:devfrom
ReneNulschDE:MercedesMeV1-1
Feb 13, 2018
Merged

Fix MercedesMe - add check for unsupported features#12342
balloob merged 3 commits intohome-assistant:devfrom
ReneNulschDE:MercedesMeV1-1

Conversation

@ReneNulschDE
Copy link
Copy Markdown
Contributor

Description:

This PR adds some additional checks for available features. The feature set depends on car configuration and country.

Checklist:

  • The code change is tested and works locally.

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

dev_id=dev_id, host_name=name,
gps=(lat, lon), attributes=attrs
)
if device['services'].get('VEHICLE_FINDER', False):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make this a guard clause instead by inverting the check and continue the iteration if the check is true. Then you can outdent the following block.

@balloob balloob added this to the 0.63.2 milestone Feb 12, 2018
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.

Looks good to me!

@balloob balloob merged commit 00ff305 into home-assistant:dev Feb 13, 2018
@ReneNulschDE ReneNulschDE deleted the MercedesMeV1-1 branch February 13, 2018 06:45
balloob pushed a commit that referenced this pull request Feb 14, 2018
* Add check for unsupported features

* Lint fix

* change to guard clause
@balloob balloob mentioned this pull request Feb 14, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 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