Skip to content
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

[tesla] Fix discovery of Tesla vehicles from account #14070

Merged
merged 2 commits into from
Dec 31, 2022

Conversation

kaikreuzer
Copy link
Member

So far, vehicles that are asleep (which is the normal situation) are not discovered and thus not put into the Inbox, what is fairly unexpected for the user.
This change makes sure that every vehicle of the account is added to the Inbox. It defers the identification of the model to a later stage as this is only required for creating the Thing with all its channels.

Signed-off-by: Kai Kreuzer kai@openhab.org

Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer kaikreuzer added the bug An unexpected problem or unintended behavior of an add-on label Dec 27, 2022
@kaikreuzer kaikreuzer requested a review from a team December 27, 2022 08:22
@kaikreuzer kaikreuzer requested a review from kgoderis as a code owner December 27, 2022 08:22
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

I was not aware of the existence of the ThingTypeMigrationService service.

@@ -81,31 +81,15 @@ public void deactivate() {

@Override
public void vehicleFound(Vehicle vehicle, VehicleConfig vehicleConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add @Nullable to the parameter vehicleConfig.

Copy link
Member Author

Choose a reason for hiding this comment

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

The whole class/binding does not yet have null annotations on it, I wouldn't want to do it as part of a bug fix.

Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer
Copy link
Member Author

@lolodomo Thanks for the quick review - I have addressed your comments.

@kaikreuzer kaikreuzer requested a review from lolodomo December 27, 2022 14:16
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@lolodomo lolodomo merged commit 2d54026 into openhab:main Dec 31, 2022
@lolodomo lolodomo added this to the 4.0 milestone Dec 31, 2022
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
* Fix discovery of Tesla vehicles from account

Signed-off-by: Kai Kreuzer <kai@openhab.org>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* Fix discovery of Tesla vehicles from account

Signed-off-by: Kai Kreuzer <kai@openhab.org>
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
* Fix discovery of Tesla vehicles from account

Signed-off-by: Kai Kreuzer <kai@openhab.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants