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

Adapt to core changes (ThingHandlerService) #16107

Merged
merged 183 commits into from Jan 3, 2024
Merged

Adapt to core changes (ThingHandlerService) #16107

merged 183 commits into from Jan 3, 2024

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Dec 24, 2023

@wborn wborn removed awaiting other PR Depends on another PR rebuild Triggers Jenkins PR build labels Jan 2, 2024
@J-N-K
Copy link
Member Author

J-N-K commented Jan 2, 2024

@openhab/add-ons-maintainers Please make sure that every contribution of thing-bound actions/providers/services follows the new coding scheme. Since this is a breaking change, older and newer versions that make use of ThingHandlerService will no longer work with the old code.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Thanks for your huge work! It nicely cleans up all the workarounds. 👍

I only found these comments:

Copy link
Member

@david-pace david-pace left a comment

Choose a reason for hiding this comment

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

LGTM for boschshc

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K
Copy link
Member Author

J-N-K commented Jan 2, 2024

done

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@wborn wborn added this to the 4.2 milestone Jan 2, 2024
@wborn wborn added the enhancement An enhancement or new feature for an existing add-on label Jan 2, 2024
Copy link
Contributor

@mvalla mvalla left a comment

Choose a reason for hiding this comment

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

LGTM for OpenWebNet

Copy link
Contributor

@stefanroellin stefanroellin left a comment

Choose a reason for hiding this comment

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

If I read the annotation in AbstractThingHandlerDiscoveryService correctly, we can assume that thingHandler is not null and it is not necessary to check for null. Is this correct? If so, some checks in PilightDeviceDiscoveryService can be removed. I could do this in a follow up pull request after this is merged.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

There are a few more overridden methods that have this issue:

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K
Copy link
Member Author

J-N-K commented Jan 2, 2024

Done.

Copy link
Contributor

@stefanroellin stefanroellin left a comment

Choose a reason for hiding this comment

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

LGTM for pilight. Thanks for the changes.

Copy link

@MrRonfo MrRonfo left a comment

Choose a reason for hiding this comment

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

LGTM for bticinosmarther

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Looks like there are a few more:

TapoBridgeConfiguration config = bridge.getBridgeConfig();
public void initialize() {
thingHandler.setDiscoveryService(this);
TapoBridgeConfiguration config = thingHandler.getBridgeConfig();
Copy link
Member

Choose a reason for hiding this comment

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

I think it should also call super.initialize(); here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Debatable, because the service handles its background discovery by itself and the activate method didn't call super.activate either. I have refactored that to use the standard mechanism, unfortunately I can't test it.

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K
Copy link
Member Author

J-N-K commented Jan 3, 2024

done

Copy link

@gdolfen gdolfen left a comment

Choose a reason for hiding this comment

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

LGTM for enigma2

@wborn wborn merged commit 3136425 into openhab:main Jan 3, 2024
3 checks passed
@J-N-K J-N-K deleted the x branch January 3, 2024 11:13
Cybso pushed a commit to Cybso/openhab-addons that referenced this pull request Jan 5, 2024
Related to: openhab/openhab-core#3957

Signed-off-by: Jan N. Klug <github@klug.nrw>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
Related to: openhab/openhab-core#3957

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet