Skip to content

Add transport data from maps.yandex.ru api#26252

Merged
MartinHjelmare merged 19 commits into
home-assistant:devfrom
rishatik92:dev
Sep 19, 2019
Merged

Add transport data from maps.yandex.ru api#26252
MartinHjelmare merged 19 commits into
home-assistant:devfrom
rishatik92:dev

Conversation

@rishatik92
Copy link
Copy Markdown
Contributor

@rishatik92 rishatik92 commented Aug 28, 2019

Breaking Change:

Description:

This feature allow to obtain bus departure time at transport stops in many russian cities

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: yandex_transport
    stop_id: 9639579

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.
  • I have followed the development checklist

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

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

@homeassistant
Copy link
Copy Markdown
Contributor

Hi @rishatik92,

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!

@rishatik92
Copy link
Copy Markdown
Contributor Author

Hi all.
Feature was developed in the image dublin_bus_transport (https://www.home-assistant.io/components/dublin_bus_transport/)

Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
@MartinHjelmare MartinHjelmare changed the title adding feature obtaining Moscow transport data from maps.yandex.ru api Add Moscow transport data from maps.yandex.ru api Aug 31, 2019
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please add a simple docstring to the package __init__.py module too.

Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please add the device_class property to the entity and return "timestamp".

https://developers.home-assistant.io/docs/en/entity_sensor.html#available-device-classes

Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
Comment thread homeassistant/components/moscow_yandex_transport/sensor.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

File CODEOWNERS is not up to date. Please run python3 -m script.hassfest and commit the changes.

@MartinHjelmare
Copy link
Copy Markdown
Member

Also run script/gen_requirements_all.py and commit the changes.

@MartinHjelmare
Copy link
Copy Markdown
Member

Please also update .coveragerc to exclude this integration.

@MartinHjelmare
Copy link
Copy Markdown
Member

These instructions were in the PR template before you removed them.

https://github.com/home-assistant/home-assistant/blob/dev/.github/PULL_REQUEST_TEMPLATE.md

@frenck
Copy link
Copy Markdown
Member

frenck commented Sep 3, 2019

⚠️ I was unable to find a documentation PR (matching this code change) in our documentation repository.

Please, update the documentation and open a PR for it (be sure to create a documentation PR against the next branch) and link 🔗 this PR and the new documentation PR by mentioning the link to the PR's in both openings posts/descriptions.

🏷 I am adding the docs-missing label until this has been resolved.

@rishatik92 rishatik92 changed the title Add Moscow transport data from maps.yandex.ru api Add transport data from maps.yandex.ru api Sep 4, 2019
@MartinHjelmare
Copy link
Copy Markdown
Member

Please solve the lint issues and run black to format the code.

@rishatik92
Copy link
Copy Markdown
Contributor Author

Please solve the lint issues and run black to format the code.

Done 😊

Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/mock_import.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/mock_import.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Comment thread tests/components/yandex_transport/test_yandex_transport_sensor.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Great!

@rishatik92
Copy link
Copy Markdown
Contributor Author

Great!

Great thanks to you for the instructions! 😊

@MartinHjelmare
Copy link
Copy Markdown
Member

Can be merged when build passes.

@rishatik92
Copy link
Copy Markdown
Contributor Author

Can be merged when build passes.

lets do it!)

@MartinHjelmare MartinHjelmare merged commit 9e2cd51 into home-assistant:dev Sep 19, 2019
pvizeli added a commit that referenced this pull request Sep 20, 2019
pvizeli added a commit that referenced this pull request Sep 20, 2019
@lock lock Bot locked and limited conversation to collaborators Sep 20, 2019
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