8000 Update rejseplanen.markdown by Jawar19 · Pull Request #39576 · home-assistant/home-assistant.io · GitHub
[go: up one dir, main page]

Skip to content

Update rejseplanen.markdown #39576

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 1 commit into
base: next
Choose a base branch
from

Conversation

Jawar19
Copy link
@Jawar19 Jawar19 commented Jun 16, 2025

Proposed change

Updated docs to reflect the code change in home-assistant/core#146944 where new way of finding stop id's and the requirement of API key is implemented.

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

Removed unused parameters and added information on how to find the correct stop ids and get and add API key.

  • 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
    • Updated integration documentation to reflect new data source terminology and configuration changes.
    • Added instructions for obtaining and using an API key, including monthly usage limits.
    • Changed configuration examples to require an authentication key and a list of stop IDs.
    • Removed references and guidance for route and direction filters, focusing on departure type filtering.
    • Clarified and expanded instructions for finding stop IDs using updated API endpoints.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jun 16, 2025
Copy link
netlify bot commented Jun 16, 2025

Deploy Preview for home-assistant-docs failed.

Name Link
🔨 Latest commit 836bcf6
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/685007e8c0ace80008b3c158

Copy link
Contributor
coderabbitai bot commented Jun 16, 2025
📝 Walkthrough

Walkthrough

The documentation for the rejseplanen integration was updated to reflect a new data source, require an API key, and change the configuration schema. The stop_id field now accepts a list of integers, an authentication key is required, and the route and direction filters were removed from both the schema and configuration examples.

Changes

File(s) Change Summary
source/_integrations/rejseplanen.markdown Updated documentation: changed data source terminology, added API key requirement, modified config schema and examples, removed route and direction filters, clarified instructions for obtaining stop_id, and simplified filtering guidance.

Sequence Diagram(s)

sequenceDiagram
    User->>Rejseplanen Integration: Provide API key and list of stop IDs
    Rejseplanen Integration->>Rejseplanen API: Request multidepartureboard data (authenticated)
    Rejseplanen API-->>Rejseplanen Integration: Return departure data for specified stops
    Rejseplanen Integration-->>User: Display filtered departure information
Loading

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: 4

🔭 Outside diff range comments (1)
source/_integrations/rejseplanen.markdown (1)

37-51: Add missing authentication key to configuration schema
The schema declaration block omits the required authentication key. Add:

 {% configuration %}
 stop_id:
   description: The ID of the public transport stop.
   required: true
   type: list[int]
+authentication:
+  description: API key for accessing Rejseplanen data.
+  required: true
+  type: string
 name:
   description: "The name of the sensor. Entity ID for the sensor will be created based on this name."
   required: false
   type: string
 {% endconfiguration %}
🧹 Nitpick comments (1)
source/_integrations/rejseplanen.markdown (1)

55-55: Replace apostrophe in "Stop ID's" with "IDs"
The plural of ID should be “IDs” without an apostrophe.

📜 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 ae22660 and 836bcf6.

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

[style] ~20-~20: Consider a more concise word here.
Context: ...www.rejseplanen.dk/). ## Prerequisites In order to use the integration you must uptain an ...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~21-~21: Possible missing comma found.
Context: .... ## Prerequisites In order to use the integration you must uptain an API key from Rejsepl...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~60-~60: Possible missing comma found.
Context: ...propriate data such as API key and stop name e.g. Roskilde [https://www.rejseplanen....

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~102-~102: Possible missing comma found.
Context: ... ``` Find the name of your stop in the list and the "id" is the parameter marked as...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/rejseplanen.markdown

20-20: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


21-21: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


57-57: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


59-59: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


64-64: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

⏰ 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 (1)
source/_integrations/rejseplanen.markdown (1)

82-83: Coordinate search instructions look good
Clear, accurate, and consistent with the string-search section.

10000

Comment on lines +18 to +19
The `rejseplanen` {% term integration %} will provide you with travel details for Danish public transport, using multidepartureborad data from [Rejseplanen](https://www.rejseplanen.dk/).

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Typo in "multidepartureborad"
The term “multidepartureborad” is misspelled—should be “multidepartureboard.”

🤖 Prompt for AI Agents
In source/_integrations/rejseplanen.markdown around lines 18 to 19, correct the
typo "multidepartureborad" to "multidepartureboard" to fix the spelling error.

The `rejseplanen` {% term integration %} will provide you with travel details for Danish public transport, using multidepartureborad data from [Rejseplanen](https://www.rejseplanen.dk/).

## Prerequisites
In order to use the integration you must uptain an API key from Rejseplanen.dk. You can apply for this by using the [request form](https://labs.rejseplanen.dk/hc/da/requests/new) on their webpage. Keep in mind, the private API key allows for 50.000 calls/month.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix spelling and punctuation in prerequisites
Change “In order to use the integration you must uptain an API key” to:

In order to use the integration, you must obtain an API key…
🧰 Tools
🪛 LanguageTool

[uncategorized] ~21-~21: Possible missing comma found.
Context: .... ## Prerequisites In order to use the integration you must uptain an API key from Rejsepl...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)

21-21: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

🤖 Prompt for AI Agents
In source/_integrations/rejseplanen.markdown at line 21, fix the spelling and
punctuation by changing "In order to use the integration you must uptain an API
key" to "In order to use the integration, you must obtain an API key" to correct
the spelling of "obtain" and add the missing comma after "integration".

Comment on lines +109 to +115
# Example configuration.yaml entry with the correct use of authentication.
sensor:
- platform: rejseplanen
name: "Elmegade 350S"
stop_id: "000045740"
route: "Bus 350S"
direction:
- 'Herlev St.'
- 'Ballerup St.'
name: "Roskilde St."
authentication: <YOUR_API_KEY>
stop_id:
- 860061707
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consistent quoting and placeholder format in second example
Wrap the API key placeholder in quotes to avoid YAML parsing issues:

-    authentication: <YOUR_API_KEY>
+    authentication: "YOUR_API_KEY"

Also ensure both examples align on placeholder style.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Example configuration.yaml entry with the correct use of authentication.
sensor:
- platform: rejseplanen
name: "Elmegade 350S"
stop_id: "000045740"
route: "Bus 350S"
direction:
- 'Herlev St.'
- 'Ballerup St.'
name: "Roskilde St."
authentication: <YOUR_API_KEY>
stop_id:
- 860061707
# Example configuration.yaml entry with the correct use of authentication.
sensor:
- platform: rejseplanen
name: "Roskilde St."
authentication: "YOUR_API_KEY"
stop_id:
- 860061707
🤖 Prompt for AI Agents
In source/_integrations/rejseplanen.markdown around lines 109 to 115, the API
key placeholder in the example YAML is not quoted, which can cause YAML parsing
errors. Wrap the <YOUR_API_KEY> placeholder in quotes to ensure proper parsing
and update both examples to use the same quoted placeholder style for
consistency.

Comment on lines +32 to +34
authentication: "YOUR_API_KEY"
stop_id:
- "YOUR_STOP_ID"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Mismatch between example and schema for stop_id
The example uses a string ("YOUR_STOP_ID") but the schema enforces list[int]. Update the snippet to use unquoted integers:

-    stop_id:
-      - "YOUR_STOP_ID"
+    stop_id:
+      - YOUR_STOP_ID  # integer, no quotes
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
authentication: "YOUR_API_KEY"
stop_id:
- "YOUR_STOP_ID"
authentication: "YOUR_API_KEY"
stop_id:
- YOUR_STOP_ID # integer, no quotes
🤖 Prompt for AI Agents
In source/_integrations/rejseplanen.markdown around lines 32 to 34, the example
for stop_id uses a quoted string which conflicts with the schema expecting a
list of integers. Update the example by removing the quotes and using integers
directly in a list format to match the schema requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0