Skip to content
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

Store Dim Level When Resume Dim is Enabled #416

Open
krkeegan opened this issue May 19, 2021 · 0 comments
Open

Store Dim Level When Resume Dim is Enabled #416

krkeegan opened this issue May 19, 2021 · 0 comments

Comments

@krkeegan
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Resume Dim as added by #411 alters the default on_level of devices. However, the on_level is not stored, so when the device is toggled manually, it reports 100% brightness when it may be less than that.

Describe the solution you'd like
I think the solution needs to look something like

Add logic to the handle_on_off method in Device/base/Base that saves the on_level when resume_dim is enabled. This can be saved to set_meta("on_level"), which is already used by the local_on_level setting, to enable it to work across reboots. This will require saving the resume_dim state to the meta field and then checking this state inside handle_on_off

Then when derive_on_level in DimmerBase is called it will report the correct on level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant