-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
1d1553e
to
19d171e
Compare
@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 |
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.
Thanks for your huge work! It nicely cleans up all the workarounds. 👍
I only found these comments:
...main/java/org/openhab/binding/verisure/internal/discovery/VerisureThingDiscoveryService.java
Show resolved
Hide resolved
...sync/src/main/java/org/openhab/binding/vesync/internal/discovery/VeSyncDiscoveryService.java
Show resolved
Hide resolved
...le/src/main/java/org/openhab/binding/windcentrale/internal/WindcentraleDiscoveryService.java
Show resolved
Hide resolved
...inding.wled/src/main/java/org/openhab/binding/wled/internal/WLedSegmentDiscoveryService.java
Show resolved
Hide resolved
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.
LGTM for boschshc
Signed-off-by: Jan N. Klug <github@klug.nrw>
done |
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 very much!
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.
LGTM for OpenWebNet
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.
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.
.../main/java/org/openhab/binding/pilight/internal/discovery/PilightDeviceDiscoveryService.java
Show resolved
Hide resolved
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.
There are a few more overridden methods that have this issue:
.../src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzDiscoveryService.java
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzDiscoveryService.java
Show resolved
Hide resolved
...ding.asuswrt/src/main/java/org/openhab/binding/asuswrt/internal/AsuswrtDiscoveryService.java
Show resolved
Hide resolved
...src/main/java/org/openhab/binding/boschindego/internal/discovery/IndegoDiscoveryService.java
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <github@klug.nrw>
Done. |
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.
LGTM for pilight. Thanks for the changes.
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.
LGTM for bticinosmarther
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.
Looks like there are a few more:
...main/java/org/openhab/binding/qolsysiq/internal/discovery/QolsysIQChildDiscoveryService.java
Show resolved
Hide resolved
TapoBridgeConfiguration config = bridge.getBridgeConfig(); | ||
public void initialize() { | ||
thingHandler.setDiscoveryService(this); | ||
TapoBridgeConfiguration config = thingHandler.getBridgeConfig(); |
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 think it should also call super.initialize();
here?
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.
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.
...tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ab.binding.tr064/src/main/java/org/openhab/binding/tr064/internal/Tr064DiscoveryService.java
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <github@klug.nrw>
done |
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.
LGTM for enigma2
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw>
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Related to: openhab/openhab-core#3957 Signed-off-by: Jan N. Klug <github@klug.nrw>
See openhab/openhab-core#3957