Add Norwegian Public Transportation sensor (Ruter).#18237
Add Norwegian Public Transportation sensor (Ruter).#18237balloob merged 6 commits intohome-assistant:devfrom ludeeus:ruter
Conversation
amelchio
left a comment
There was a problem hiding this comment.
Looks good, I just have a few proposals for slight cleanups.
…orrected link, removed unused variable.
|
Thanks @amelchio :) |
|
@amelchio you can merge if you approve 👍 |
| name = config[CONF_NAME] | ||
| offset = config[CONF_OFFSET] | ||
|
|
||
| ruter = Departures(hass.loop, stop_id, destination) |
There was a problem hiding this comment.
We want all libraries that use aiohttp to take a session argument so that we can reuse the home assistant session throughout the app.
There was a problem hiding this comment.
I was not aware of that, will change it that and create a new PR later today :)
There was a problem hiding this comment.
Isn't it more like "we would like"? I believe that part of the deal with using third party libraries is that we don't get to dictate their interface.
Still, @ludeeus, please do continue with implementing that :)
There was a problem hiding this comment.
@amelchio we don't have to dictate their interface, but very much like if they do take in an optional aiohttp session instead of creating their own if they use aiohttp.
There was a problem hiding this comment.
Yes, and for a library created for Home Assistant that is no biggie. I was more concerned about rejecting a new platform because an existing library does not support passing in the session.
|
Very cool to see this implemented in Home Assistant. |
|
Entur is integrated: Please, do not used closed pr for discussion. |
Description:
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7379
Example entry for
configuration.yaml(if applicable):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:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.