insteon-mqtt
insteon-mqtt copied to clipboard
Store Dim Level When Resume Dim is Enabled
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.