Skip to content

fix: store previous brightness when turning off display - #23

Merged
gabe565 merged 1 commit into
mainfrom
store-previous-brightness
May 16, 2026
Merged

gabe565 merged 1 commit into
mainfrom
store-previous-brightness

Conversation

@gabe565

@gabe565 gabe565 commented May 16, 2026

Copy link
Copy Markdown
Member

Fixes #17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request implements state restoration for TronbytLight entities by introducing a _last_brightness attribute to track and persist the last known non-zero brightness level. This allows lights to return to their previous state when turned on without a specific brightness value. The feedback suggests refining the restoration logic to ensure that only brightness values greater than zero are captured, preventing an "off" state from being incorrectly restored as the last active brightness level.

@gabe565
gabe565 force-pushed the store-previous-brightness branch from 9449240 to a568519 Compare May 16, 2026 09:33
@gabe565
gabe565 merged commit 7343d09 into main May 16, 2026
5 checks passed
@gabe565
gabe565 deleted the store-previous-brightness branch May 16, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brightness button turns off, but won't turn on

1 participant