Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NSAPI library and add attribute for average trip punctuality #31741

Merged
merged 2 commits into from
Feb 16, 2020
Merged

Conversation

Squixx
Copy link
Contributor

@Squixx Squixx commented Feb 11, 2020

Breaking change

Proposed change

Updates the NSAPI to better handle some missing values, and adds the average (3month) punctuality of a the trip to the sensor output if available

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

sensor:
  - platform: nederlandse_spoorwegen
    api_key: !secret ns_api
    routes:
      - name: Utrecht-Bijlmer
        from: Ut
        to: Asb
      - name: Bijlmer-Utrecht
        from: Asb
        to: Ut
      - name: Overvecht-Den-Dolder
        from: Uto
        to: Dld
      - name: Den-Dolder-Overvecht
        from: Dld
        to: Uto

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@homeassistant
Copy link
Contributor

Hi @Squixx,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@probot-home-assistant
Copy link

Hey there @YarmoM, mind taking a look at this pull request as its been labeled with a integration (nederlandse_spoorwegen) you are listed as a codeowner for? Thanks!

@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #31741 into dev will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #31741      +/-   ##
==========================================
- Coverage   94.66%   94.65%   -0.01%     
==========================================
  Files         762      762              
  Lines       55029    55029              
==========================================
- Hits        52093    52090       -3     
- Misses       2936     2939       +3     
Impacted Files Coverage Δ
homeassistant/components/template/cover.py 96.34% <0.00%> (-1.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 378bd84...152997e. Read the comment docs.

@YarmoM
Copy link
Contributor

YarmoM commented Feb 12, 2020

Thanks for the PR, much needed update to fix some problems people have been having! First commit looks good, but I'm not sure the second commit will be accepted (202 files changed…).

@Squixx
Copy link
Contributor Author

Squixx commented Feb 12, 2020

2nd commit is just a merge of dev, so no actual delta.

Still getting used to git with upstream repository's

I can revert and rebase if that would be preferable :)

By the way, nice addition of optional time. Was just about to do that :)

@YarmoM
Copy link
Contributor

YarmoM commented Feb 12, 2020

The "specific train" part was added by @gurbyz (#28898), really nice addition!

With regards to the second commit, I think a maintainer would give you better advice than I could, let's wait for that.

Copy link
Member

@springstan springstan left a comment

Choose a reason for hiding this comment

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

LGTM! ✌

@springstan springstan changed the title Update NSAPI library and show average trip punctuality Update NSAPI library and add attribute for average trip punctuality Feb 12, 2020
@springstan springstan merged commit 2516b94 into home-assistant:dev Feb 16, 2020
@lock lock bot locked and limited conversation to collaborators Feb 17, 2020
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