Skip to content

volvooncall: Handle the case where no registration number is returned by the API for a vehicle.#9073

Merged
balloob merged 1 commit into
home-assistant:devfrom
molobrakos:voc-regno-fix
Sep 5, 2017
Merged

volvooncall: Handle the case where no registration number is returned by the API for a vehicle.#9073
balloob merged 1 commit into
home-assistant:devfrom
molobrakos:voc-regno-fix

Conversation

@molobrakos
Copy link
Copy Markdown
Contributor

Instead display VIN (vehicle identification number).
Closes molobrakos/volvooncall#9
Also extract component state into a data class.

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

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
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@mention-bot
Copy link
Copy Markdown

@molobrakos, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @palp and @pvizeli to be potential reviewers.

@andrey-git
Copy link
Copy Markdown
Contributor

Is it possible to add at least partial tests?

Comment thread homeassistant/components/volvooncall.py Outdated
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.

This code could really benefit from being rewritten as if…elsif statements.

Comment thread homeassistant/components/volvooncall.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

visually indented line with same indent as next logical line

@balloob balloob merged commit 418ccc8 into home-assistant:dev Sep 5, 2017
@balloob balloob mentioned this pull request Sep 7, 2017
@molobrakos molobrakos deleted the voc-regno-fix branch November 25, 2017 10:02
@home-assistant home-assistant locked and limited conversation to collaborators Mar 3, 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.

Recurring error in logs

6 participants