[hue] Fix firmware availability issues - #20709
Conversation
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
There was a problem hiding this comment.
Pull request overview
Fixes Hue API v2 bridge firmware update availability signaling so the trigger channel matches the documented channel group and avoids repeated hourly trigger events.
Changes:
- Prefix the update-ready trigger channel ID with the
softwarechannel group (software#update-ready). - Add a handler-side guard to only trigger the “update ready” event once per runtime.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/HueBindingConstants.java | Adjustes the update-ready channel ID to include the software group separator. |
| bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/Clip2BridgeHandler.java | Prevents repeated triggering of the update-ready event by tracking whether a notification was already sent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as resolved.
This comment was marked as resolved.
jlaur
left a comment
There was a problem hiding this comment.
Thanks! I have not yet had time to test this, but did a quick review for now.
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/handler/Clip2BridgeHandler.java:1
softwareUpdateReadyNotificationSentis unintentionally reset tofalsewhenstatus == READY_TO_INSTALLand the notification was already sent. In that case,newSentFlagValuestaysfalseand the assignment at the end clears the flag, causing the trigger to fire again on the next refresh. Fix by ensuring the “sent” flag remainstruefor as long as the status remainsREADY_TO_INSTALL(e.g., initializenewSentFlagValuefromwasSentFlagValue, or explicitly setnewSentFlagValue = wasSentFlagValue || status == READY_TO_INSTALLand only calltriggerChannelon the transition from not-sent to sent).
/*
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
jlaur
left a comment
There was a problem hiding this comment.
Tested and reviewed, LGTM.
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch> Signed-off-by: olemr <olemr@olemr.com>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Resolves #20702
Depends on #20707Signed-off-by: Andrew Fiddian-Green software@whitebear.ch