Skip to content

direction uses station id #39045

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

Open
wants to merge 2 commits into
base: current
Choose a base branch
from
Open

Conversation

lollilol
Copy link
Contributor

@lollilol lollilol commented May 15, 2025

Proposed change

I changed the documentation so that it tells users to use the station id instead of the station name for "direction".

For the "direction" variable, the documentation tells me to use the station name. This never worked for me. When i tried using the station id it worked.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • Documentation
    • Clarified that station IDs must use the "HAFAS_ID" from the RMV OpenData website.
    • Updated the description for the direction option to require a station ID instead of a station name.
    • Added an example configuration demonstrating use of station IDs and time offsets.
    • Included explanatory text for the new example sensor.

lollilol added 2 commits May 15, 2025 19:25
make it clearer that you need to use the hafas id
variable "direction" needs the station id instead of the station name
@lollilol lollilol requested a review from cgtobi as a code owner May 15, 2025 17:41
@home-assistant home-assistant bot added the current This PR goes into the current branch label May 15, 2025
Copy link

netlify bot commented May 15, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 665974e
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/68262767a77143000773a24f
😎 Deploy Preview https://deploy-preview-39045--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lollilol lollilol changed the title Patch 1 direction uses station id May 15, 2025
Copy link
Contributor

coderabbitai bot commented May 15, 2025

📝 Walkthrough

Walkthrough

The documentation for the RMV transport integration was updated to clarify the use of "HAFAS_ID" station IDs, revise the description of the direction configuration to require an ID instead of a name, and add an example sensor configuration using these conventions.

Changes

File(s) Change Summary
source/_integrations/rmvtransport.markdown Updated documentation to specify use of "HAFAS_ID" for station IDs, revised direction option description, and added a new example sensor configuration with explanatory text.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Documentation
    User ->> Documentation: Reads RMV transport integration guide
    Documentation -->> User: Explains use of "HAFAS_ID" for station IDs
    Documentation -->> User: Provides example sensor configuration with ID-based direction
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
source/_integrations/rmvtransport.markdown (1)

24-24: Nitpick: Use 'website' as one word
Modern usage favors "website" over "web site".
Suggest updating:

- Visit the [RMV OpenData web site](https://opendata.rmv.de) to find a list of valid station IDs. You will need to use the "HAFAS_ID".
+ Visit the [RMV OpenData website](https://opendata.rmv.de) to find a list of valid station IDs. You will need to use the "HAFAS_ID".
🧰 Tools
🪛 LanguageTool

[style] ~24-~24: Nowadays, it’s more common to write this as one word.
Context: ...tes. ## Setup Visit the RMV OpenData web site to find a lis...

(RECOMMENDED_COMPOUNDS)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa6387 and 665974e.

📒 Files selected for processing (1)
  • source/_integrations/rmvtransport.markdown (3 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/rmvtransport.markdown

[style] ~24-~24: Nowadays, it’s more common to write this as one word.
Context: ...tes. ## Setup Visit the RMV OpenData web site to find a lis...

(RECOMMENDED_COMPOUNDS)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (3)
source/_integrations/rmvtransport.markdown (3)

64-64: Clarify 'direction' expects an ID
The updated description correctly specifies that the direction field requires a HAFAS ID (e.g., 3000912), aligning with the RMV API behavior and improving accuracy for users.


119-122: Approve example using station ID for direction
The new fourth sensor example correctly demonstrates using station IDs for both station and direction. The YAML indentation and syntax are consistent with the preceding examples.


130-131: Approve explanatory text for the fourth sensor
The added line clearly explains the behavior of the new sensor: it returns connections from Niederrad Bahnhof going to or over Frankfurt Hauptbahnhof. This aligns well with the example configuration.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

This never worked for me. When i tried using the station id it worked.

Is that a bug or intended functionality that this actually doesn't work? Have you verified that?

../Frenck

@home-assistant home-assistant bot marked this pull request as draft May 25, 2025 17:28
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@lollilol
Copy link
Contributor Author

This never worked for me. When i tried using the station id it worked.

Is that a bug or intended functionality that this actually doesn't work? Have you verified that?

../Frenck

i saw that the code in the library uses direction_id
https://github.com/cgtobi/PyRMVtransport/blob/5943356ef9de02acf61cd372026adbaf6b04e59c/RMVtransport/rmvtransport.py#L44

Copy link

github-actions bot commented Aug 9, 2025

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale The PR had no activity for quite some time, and is marked as Stale label Aug 9, 2025
@silamon silamon marked this pull request as ready for review August 10, 2025 07:36
@home-assistant home-assistant bot requested a review from frenck August 10, 2025 07:36
@github-actions github-actions bot removed the stale The PR had no activity for quite some time, and is marked as Stale label Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants