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

Add Trafikverket train component #23470

Merged
merged 14 commits into from Jun 24, 2019

Conversation

@endor-force
Copy link
Contributor

commented Apr 27, 2019

Description:

New component for Trafikverket train information.

This component will enable retreival of the following information:

  • Next departure for specific train line.
  • Canceled status.
  • Number of minutes delayed.
  • Planned time.
  • Estimated time.
  • Actual time.
  • Other information / additional texts
  • Deviations

Related issue (if applicable): fixes N/A

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#9333

Example entry for configuration.yaml (if applicable):

sensor:
   - platform: trafikverket_train
     api_key: !secret trafikverket_api
     trains:
     - name: "Morning train to Malmö"
       from: "Stockholm Central"
       to: "Malmö C"
       time: "9:25"
       weekday: [mon, tue, wed, thu, fri]

     - name: "Next train to Uppsala"
       from: "Stockholm Central"
       to: "Uppsala C"

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.

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 (example).
  • New dependencies have been added to requirements in the manifest (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated 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:

  • Tests have been added to verify that the new code works.

@endor-force endor-force force-pushed the endor-force:trafikverket_train branch from 85f4747 to 3f4b536 Apr 27, 2019

homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/trafikverket_train/sensor.py Outdated Show resolved Hide resolved
@endor-force
Copy link
Contributor Author

left a comment

I think i have addressed all your reviews, please double check if it looks ok ?

@MartinHjelmare MartinHjelmare changed the title Added Trafikverket train component Add Trafikverket train component Jun 19, 2019

@MartinHjelmare
Copy link
Member

left a comment

Looks great!

@MartinHjelmare MartinHjelmare merged commit 98ba529 into home-assistant:dev Jun 24, 2019

13 checks passed

build Workflow: build
Details
ci/circleci: pre-install-all-requirements Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.7 Your tests passed on CircleCI!
Details
ci/circleci: pylint Your tests passed on CircleCI!
Details
ci/circleci: static-check Your tests passed on CircleCI!
Details
ci/circleci: test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: test 3.7 Your tests passed on CircleCI!
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 3b06bdd...acd10cb
Details
codecov/project 94.29% (target 90%)
Details

@endor-force endor-force deleted the endor-force:trafikverket_train branch Jun 24, 2019

@balloob balloob removed the new-platform label Jul 16, 2019

@balloob balloob referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.