Skip to content

Fix the line reference in config error message#20743

Merged
balloob merged 4 commits intohome-assistant:devfrom
awarecan:platform-config-err-msg
Feb 4, 2019
Merged

Fix the line reference in config error message#20743
balloob merged 4 commits intohome-assistant:devfrom
awarecan:platform-config-err-msg

Conversation

@awarecan
Copy link
Copy Markdown
Contributor

@awarecan awarecan commented Feb 4, 2019

Description:

The platform configuration will go through double validation, first on component level then platform level.
The error handling in the latter validation was passing the result of first validation which already lost meta information about the configuration file and line number.

Related issue (if applicable): fixes #20738

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

Example entry for configuration.yaml (if applicable):

camera:
  - platform: generic
    xstill_image_url: 'someurl'
  - xplatform: generic
    ystill_image_url: 'otherurl'

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@awarecan awarecan requested a review from a team as a code owner February 4, 2019 17:56
@homeassistant homeassistant added cla-signed core small-pr PRs with less than 30 lines. labels Feb 4, 2019
@ghost ghost assigned awarecan Feb 4, 2019
@ghost ghost added the in progress label Feb 4, 2019
@balloob balloob added this to the 0.87.0 milestone Feb 4, 2019
@balloob
Copy link
Copy Markdown
Member

balloob commented Feb 4, 2019

Tagging for 87 because better errors are better 👍

@balloob balloob merged commit c812176 into home-assistant:dev Feb 4, 2019
@ghost ghost removed the in progress label Feb 4, 2019
@awarecan awarecan deleted the platform-config-err-msg branch February 4, 2019 22:39
balloob pushed a commit that referenced this pull request Feb 5, 2019
* Fix the line reference in config error message

* Fix platform config validation

* Fix test

* Handle error in error handling routine
@balloob balloob mentioned this pull request Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no file name or line number in config validation error message

3 participants