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.
Add new Volvo integration #142994
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: dev
Are you sure you want to change the base?
Add new Volvo integration #142994
Changes from all commits
1b7db2a
28245fa
544cb49
4b3701b
d25ce9b
f97ce16
8a06d93
680a069
8fb7ea7
19021b1
f1c919b
b6bd17f
db496af
3d4ed5b
d984b75
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Ideally I would argue that we create 1 entry for the account and just create the cars on the fly. It might even use sub entries
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.
The thing is that, once all platforms have been added, a single coordinator update cycle will consume about a dozen of API requests. There is a limit on the number of API requests a user can make per API key. So I wouldn't add all vehicles on the fly, and try to keep an API key per vehicle. I can look into sub entries if that is still feasible then.
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.
I've spent a few hours wrapping my head around sub entries (most of the time to already refactoring code so I could use the same flow in both root entry and sub entry, but probably was not the best choice in hindsight 😄). I'm at the point now where I can create a sub entry, but it seems that the integration init only runs for the root config entry.
I've searched in the source code for examples, and could only find
kitchen_sink
andmqtt
, but it is still unclear to me how to assign entities to the sub entry, or let the coordinator do its work.How can I now effectively add entities to a sub entry? I thought HA would init all sub entries automatically, as if they were a first class entry. That would take some load off of the implementors and simplify things from a implementor's perspective. Or if that is not possible, then maybe sub entries are not the best fit for this scenario?
Please advise.