[homekit] Apply status description if battery is low - #20761
Draft
andrewfg wants to merge 6 commits into
Draft
Conversation
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrewfg
marked this pull request as draft
May 19, 2026 18:23
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the HomeKit binding to surface a Thing status description (and thus a “blue dot” in UI) when a device reports a low battery condition, mirroring the approach used in other bindings.
Changes:
- Add a new i18n translation key for an ONLINE low-battery status description.
- Introduce a constant for the new
@text/online.battery-lowkey. - Update the accessory handler to set/clear the Thing status description based on the
STATUS_LO_BATTcharacteristic state.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bundles/org.openhab.binding.homekit/src/main/resources/OH-INF/i18n/homekit.properties | Adds the online.battery-low translation string used for the ONLINE status description. |
| bundles/org.openhab.binding.homekit/src/main/java/org/openhab/binding/homekit/internal/HomekitBindingConstants.java | Adds a constant for the @text/online.battery-low i18n key. |
| bundles/org.openhab.binding.homekit/src/main/java/org/openhab/binding/homekit/internal/handler/HomekitAccessoryHandler.java | Applies/clears the ONLINE status description when the HomeKit low-battery characteristic changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Analog of #20758
Signed-off-by: Andrew Fiddian-Green software@whitebear.ch