fix: expose display brightness without display status command#193
Open
CoRfr wants to merge 1 commit intoleukipp:developfrom
Open
fix: expose display brightness without display status command#193CoRfr wants to merge 1 commit intoleukipp:developfrom
CoRfr wants to merge 1 commit intoleukipp:developfrom
Conversation
In Cage/kiosk sessions, display status commands (wlopm, kscreen-doctor, xset) are unavailable, but sysfs backlight brightness still works. Previously, displayBrightness required displayStatus, hiding the brightness control from Home Assistant. - Decouple displayBrightness from statusCommand requirement - Infer displayStatus as ON when brightness is available - Add default case in setDisplayStatus for sessions without a command Tested on Surface Pro 3 running TouchKio in a Cage wayland session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
displayBrightnessfrom requiring a display status command (wlopm/kscreen-doctor/xset)Problem
In Cage wayland sessions (common for kiosks), none of
wlopm,kscreen-doctor, orxsetare available. ThecheckSupport()function requiredstatusCommandfordisplayBrightness, so the display light entity was removed from Home Assistant even though sysfs brightness (/sys/class/backlight/*/brightness) works fine.Fix
displayBrightnessnow only requiressudoand a brightness path/command, independent of display statusdisplayStatusis inferred astruewhen brightness works (if you can control brightness, the display is on)getDisplayStatus()returns"ON"as fallback when brightness is supported but no status command existssetDisplayStatus()calls the callback in the default case so the init chain completesTesting
Tested on Surface Pro 3 running TouchKio v1.4.2 in a Cage wayland session. After the fix, the display light entity appears in Home Assistant with brightness control (1-100%).
🤖 Generated with Claude Code