Add device_tracker platform to Volvo integration#153437
Merged
joostlek merged 10 commits intoOct 10, 2025
Merged
Conversation
Merged
8 tasks
|
FWIW, did a quick check on my installation and it worked fine. |
erwindouna
requested changes
Oct 5, 2025
joostlek
requested changes
Oct 6, 2025
Contributor
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
erwindouna
reviewed
Oct 9, 2025
| @@ -380,13 +400,12 @@ def _update_state(self, api_field: VolvoCarsApiBaseModel | None) -> None: | |||
| self._attr_native_value = None | |||
| return | |||
|
|
|||
| assert isinstance(api_field, VolvoCarsValue) | |||
| native_value = None | |||
Member
There was a problem hiding this comment.
I have a bit trouble to understand why you assign this variable, whilst it will be outputted later on directly to self._attr_native_value. Can't the _attr be used?
Contributor
Author
There was a problem hiding this comment.
I'm using a variable, because in the statements below, the value could still be transformed before it is assigned to self._attr_native_value. It's probably personal taste, but I like that better than throwing self._attr_native_value everywhere around. 😄
I could move the whole block to a method if you'd prefer that.
joostlek
approved these changes
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Add device_tracker platform to Volvo integration. A direction sensor has also been added.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: