-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add Volvo sensor documentation #38549
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?
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughA new documentation file has been added for the Volvo integration in Home Assistant. This file outlines setup instructions, prerequisites such as API key creation, supported car models and regions, configuration details, and available sensor entities based on vehicle type. It also provides an example for creating a template sensor, describes polling intervals and API request limits, and lists known limitations and troubleshooting steps. Instructions for removing the integration are included. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HomeAssistant
participant VolvoAPI
User->>HomeAssistant: Provide API key and configuration
HomeAssistant->>VolvoAPI: Authenticate and request vehicle data
VolvoAPI-->>HomeAssistant: Return vehicle and sensor data
HomeAssistant-->>User: Display sensor entities (battery, fuel, odometer, etc.)
loop Every 135 seconds
HomeAssistant->>VolvoAPI: Poll for updated vehicle data
VolvoAPI-->>HomeAssistant: Return updated data
HomeAssistant-->>User: Update sensor entities
end
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:
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: 0
🧹 Nitpick comments (3)
source/_integrations/volvo.markdown (3)
64-64
: Use "until" instead of "till" for formality.For a more formal tone, consider replacing "till" with "until" in the sensor descriptions:
- "Remaining distance till the next service maintenance" → "Remaining distance until the next service maintenance"
- "Remaining engine-hours till the next service maintenance" → "Remaining engine-hours until the next service maintenance"
- "Remaining time till the next service maintenance" → "Remaining time until the next service maintenance"
Also applies to: 65-65, 69-69
🧰 Tools
🪛 LanguageTool
[style] ~64-~64: Consider using the more formal “until”.
Context: ...stance to service**: Remaining distance till the next service maintenance - **Engine...(TILL)
77-78
: Possible word repetition detected.There may be a repeated word in the following lines. Please double-check for accidental duplication and correct if necessary.
🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
139-139
: Add a comma before "or" in a compound sentence.For clarity and grammatical correctness, add a comma before "or" in the sentence:
- "The Volvo integration does not show recharge entities or they are unavailable."
→ "The Volvo integration does not show recharge entities, or they are unavailable."🧰 Tools
🪛 LanguageTool
[uncategorized] ~139-~139: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ation %} does not show recharge entities or they are unavailable. This happens beca...(COMMA_COMPOUND_SENTENCE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/volvo.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/volvo.markdown
[style] ~64-~64: Consider using the more formal “until”.
Context: ...stance to service**: Remaining distance till the next service maintenance - **Engine...
(TILL)
[style] ~65-~65: Consider using the more formal “until”.
Context: ...me to service**: Remaining engine-hours till the next service maintenance - **Odomet...
(TILL)
[style] ~69-~69: Consider using the more formal “until”.
Context: ...r - Time to service: Remaining time till the next service maintenance - **TM Avg...
(TILL)
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~139-~139: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ation %} does not show recharge entities or they are unavailable. This happens beca...
(COMMA_COMPOUND_SENTENCE)
🔇 Additional comments (1)
source/_integrations/volvo.markdown (1)
1-153
: Comprehensive and well-structured documentation.The documentation is thorough, clear, and follows Home Assistant standards. The structure, examples, and troubleshooting sections are especially helpful.
🧰 Tools
🪛 LanguageTool
[style] ~64-~64: Consider using the more formal “until”.
Context: ...stance to service**: Remaining distance till the next service maintenance - **Engine...(TILL)
[style] ~65-~65: Consider using the more formal “until”.
Context: ...me to service**: Remaining engine-hours till the next service maintenance - **Odomet...(TILL)
[style] ~69-~69: Consider using the more formal “until”.
Context: ...r - Time to service: Remaining time till the next service maintenance - **TM Avg...(TILL)
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~139-~139: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ation %} does not show recharge entities or they are unavailable. This happens beca...(COMMA_COMPOUND_SENTENCE)
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: 0
🧹 Nitpick comments (2)
source/_integrations/volvo.markdown (2)
43-43
: Add a comma for clarity in the VIN configuration description.A comma is needed after "under this account" for better readability.
- description: "If you have more than one car under this account then you can select the Vehicle Identification Number of the vehicle you wish to add." + description: "If you have more than one car under this account, then you can select the Vehicle Identification Number of the vehicle you wish to add."🧰 Tools
🪛 LanguageTool
[uncategorized] ~43-~43: Possible missing comma found.
Context: ...f you have more than one car under this account then you can select the Vehicle Identif...(AI_HYDRA_LEO_MISSING_COMMA)
77-78
: Remove repeated words in sensor descriptions.There are repeated words in the sensor descriptions for "Avg. energy consumption since charge" and "Battery capacity." Please review and remove any accidental duplication.
- - **Avg. energy consumption since charge**: Average energy consumption since the last charge of the battery - - **Battery capacity**: Total capacity of the battery + - **Avg. energy consumption since charge**: Average energy consumption since the last charge of the battery + - **Battery capacity**: Total capacity of the batteryIf there is no actual repetition in the rendered output, this can be ignored.
🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/volvo.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/volvo.markdown
[uncategorized] ~43-~43: Possible missing comma found.
Context: ...f you have more than one car under this account then you can select the Vehicle Identif...
(AI_HYDRA_LEO_MISSING_COMMA)
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...
(ENGLISH_WORD_REPEAT_RULE)
🔇 Additional comments (1)
source/_integrations/volvo.markdown (1)
1-153
: Comprehensive and clear documentation for the new Volvo integration.The documentation is well-structured, thorough, and follows Home Assistant standards. All necessary sections are present, and the technical content is accurate. The example and troubleshooting sections are especially helpful.
No further changes needed beyond minor grammar and typo fixes.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~43-~43: Possible missing comma found.
Context: ...f you have more than one car under this account then you can select the Vehicle Identif...(AI_HYDRA_LEO_MISSING_COMMA)
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
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: 0
🧹 Nitpick comments (1)
source/_integrations/volvo.markdown (1)
109-117
: Clarify the template sensor example for new users.Consider adding a brief note above the template code to clarify that users should replace
YOUR_MODEL
with their actual vehicle model identifier in the sensor name. This will help prevent confusion for users unfamiliar with template sensors.-```jinja2 -{% set charging_time = states('sensor.volvo_YOUR_MODEL_estimated_charging_time') | int(0) %} +```jinja2 +# Replace YOUR_MODEL with your vehicle's model identifier as shown in your sensor list. +{% set charging_time = states('sensor.volvo_YOUR_MODEL_estimated_charging_time') | int(0) %}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/volvo.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/volvo.markdown
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...
(ENGLISH_WORD_REPEAT_RULE)
🔇 Additional comments (2)
source/_integrations/volvo.markdown (2)
77-78
: No actual word duplication detected.The static analysis flagged possible word repetition at these lines, but the context shows each bullet describes a distinct sensor. No action needed.
🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
1-153
: Comprehensive and well-structured documentation.The documentation is thorough, clear, and follows Home Assistant standards. It covers all necessary aspects for users to set up and use the Volvo integration, including prerequisites, configuration, supported features, examples, limitations, and troubleshooting. No critical issues found.
🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
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.
Very nice new docs! Thank you, @thomasddn 👍
@c0ffeeca7 Volvo did some changes and now support more vehicles. Can I update the documentation in this PR or do I need to create a new one? |
adding it to this one is fine in this case. |
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: 1
🧹 Nitpick comments (3)
source/_integrations/volvo.markdown (3)
25-27
: Improve wording for supported vehicles
Consider rephrasing the bullets for clarity and consistency, for example:- Car models starting from model year 2010. Features available depend on model and year. + Car models from model year 2010 onward (feature availability varies by model/year). - Cars located in Europe, Middle East, Africa, US, Canada, and Latin America regions. + Vehicles registered in Europe, the Middle East, Africa, North America, and Latin America.This enhances readability and maintains a parallel structure.
77-83
: Refine descriptions to avoid repeated “battery”
The descriptions for Battery capacity and Battery charge level both repeat “battery.” Shortening them improves conciseness:- **Battery capacity**: Total capacity of the battery + **Battery capacity**: Total capacity - **Battery charge level**: Current state of charge of the battery + **Battery charge level**: Current state of chargeThis removes redundancy while retaining clarity.
🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
123-128
: Clarify polling interval warning
To make the daily request-limit note more prominent, consider adding an info admonition:> **Note:** If you set a custom polling interval, ensure you do not exceed 10 000 API calls per day.
This helps prevent accidental rate-limit issues.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/volvo.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/volvo.markdown
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...
(ENGLISH_WORD_REPEAT_RULE)
⏰ 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 (2)
source/_integrations/volvo.markdown (2)
1-19
: Metadata front matter looks good
The YAML front matter correctly specifies title, description, HA release target, codeowners, platforms, and quality scale.
59-72
: Verify sensor names match integration entities
Ensure that each sensor label (e.g., TA Avg. speed, TM Distance) precisely matches its entity ID in the core implementation (home-assistant/core#142994). Any mismatch could lead to confusion or broken references in the UI.
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: 0
🧹 Nitpick comments (2)
source/_integrations/volvo.markdown (2)
21-27
: Improve supported vehicles bullet clarity
The second bullet mixes two sentences. Consider rephrasing it as a single, cohesive statement. For example:- Cars located in Europe, Middle East, Africa, US, Canada, and Latin America. See the [full list of supported countries](https://developer.volvocars.com/terms-and-conditions/apis-supported-locations/).This will keep the bullets concise and uniform.
30-34
: Use consistent verb for account creation
In typical documentation the phrasing “Create an account” is preferred over “Make an account.” Consider updating step 2 to:2. Create an account.This will match the common terminology in other Home Assistant docs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/volvo.markdown
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/volvo.markdown
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...
(ENGLISH_WORD_REPEAT_RULE)
🔇 Additional comments (12)
source/_integrations/volvo.markdown (12)
1-19
: Verify frontmatter metadata
Please confirm thatha_release: 2025.6
aligns with the upcoming Home Assistant release schedule and thatha_quality_scale: silver
is the intended quality level for this integration.
37-38
: Config flow include is correct
The{% include integrations/config_flow.md %}
directive will pull in the standard configuration flow UI example. This aligns with documentation conventions.
39-44
: Basic configuration block is clear
Theconfiguration_basic
snippet clearly explains the required API key and optional VIN selection. No further changes needed.
46-53
: Combustion engine configuration options
The additionalconfiguration_basic
section for fuel consumption units is well-structured and informative.
59-72
: “All engine types” sensors listing
The sensors under the All engine types section follow Home Assistant documentation standards and are grouped logically.
73-83
: Battery-only and plug-in hybrid sensors
The split between general battery sensors and “Sensors for specific models” is clear. The portal link is helpful for advanced users.🧰 Tools
🪛 LanguageTool
[duplication] ~77-~77: Possible typo: you repeated a word.
Context: ...onsumption since the last charge of the battery - Battery capacity: Total capacity of the batte...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~78-~78: Possible typo: you repeated a word.
Context: ...ttery capacity**: Total capacity of the battery - Battery charge level: Current state of charge...(ENGLISH_WORD_REPEAT_RULE)
94-102
: Fuel-only and plug-in hybrid sensors
The heading consistency and placement of the “#### Sensors” subheading match the patterns in other sections. The descriptions are clear and typo-free.
103-123
: Example template sensor is well documented
The{% raw %}
block correctly prevents Jinja from rendering in the docs, and the example shows how to calculate an estimated charging finish time. This is both accurate and easy to follow.
125-130
: Data updates section is accurate
The default polling interval and reminder about the 10 000-requests/day limit are clearly stated.
131-134
: Known limitations are appropriately scoped
Listing what the official app can do that this integration can’t helps set user expectations.
135-146
: Troubleshooting guidance looks good
The description of the recharge API symptoms and automatic recovery behavior is concise and useful.
148-155
: Removal instructions are complete
Includingintegrations/remove_device_service.md
and reminding users to remove the integration from Volvo’s app covers the end-to-life process thoroughly.
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.
Thank you, @thomasddn 👍
Proposed change
Adds documentation for the new Volvo integration
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit