Fix handling of empty results from Rejseplanen#25610
Merged
MartinHjelmare merged 4 commits intoAug 1, 2019
Merged
Conversation
MartinHjelmare
requested changes
Jul 31, 2019
eca7029 to
be53a4f
Compare
Contributor
Author
|
I'm guessing I'll need to rebase again once black is merged, to fix that linting error. |
Member
|
There's a lint error merged in dev branch at the moment. That's why the build is failing. |
d82c4e6 to
7e3c24e
Compare
Contributor
Author
|
@MartinHjelmare Rebased and reformatted with Black, should be ready for merging. :) |
MartinHjelmare
approved these changes
Aug 1, 2019
Member
|
We should label it a breaking change, right? |
Contributor
Author
|
Technically yes, it changes the output. |
Member
|
Please add a breaking change paragraph in the PR description and write what has changed and what the user needs to do to cope with the breaking change. |
Member
|
Ping me when it's ready and I'll merge. |
Contributor
Author
|
@MartinHjelmare Right, that should be it. Breaking change paragraph added. 👍 |
balloob
pushed a commit
that referenced
this pull request
Aug 1, 2019
* Improve handling of empty results from Rejseplanen (Fixes #25566) * Exclude attributes with null value * Add period back into docstring * Fix formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking Change:
When there are no upcoming departures, the sensor now returns state
unknown, and removes attributes instead of setting them ton/a.Any existing templates looking for the
n/astate should be updated to look forunknowninstead, and all templates should be altered to handle potentially missing attributes.Description:
Remove
"n/a"attributes, and returnNonefor state, when no upcoming departures are returned from API.Related issue (if applicable): fixes #25566
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.If the code does not interact with devices: