-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
base: next
Are you sure you want to change the base?
Update rejseplanen.markdown #39576
Conversation
❌ Deploy Preview for home-assistant-docs failed.
|
📝 WalkthroughWalkthroughThe documentation for the Changes
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
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 missingauthentication
key to configuration schema
The schema declaration block omits the requiredauthentication
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
📒 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.
The `rejseplanen` {% term integration %} will provide you with travel details for Danish public transport, using multidepartureborad data from [Rejseplanen](https://www.rejseplanen.dk/). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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".
# 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 |
There was a problem hiding this comment.
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.
# 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.
authentication: "YOUR_API_KEY" | ||
stop_id: | ||
- "YOUR_STOP_ID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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
current
branch).current
branch).next
branch).next
branch).Additional information
Removed unused parameters and added information on how to find the correct stop ids and get and add API key.
Checklist
current
branch.next
branch.Summary by CodeRabbit