I have this being used within a button controller, where I store various switch's on/off state and dimmer levels before changing them, to be able to revert to them when done.
But then I realized I capture a dimmer's level, which could be 100, even though it's OFF. Any easy way to correct this? Outside of "if switch is on, dimmer = level, else dimmer = 0" for every single dimmer
I discovered there is a "capture/restore devices" option which appears to do just as I want, although from an aesthetic standpoint it would be nice to be able to fade any of the dimmers, which restore does not seem to be able to do
Switch and level are different attributes. Level will be the last level, even if the device is off. If you don't want to use Capture and Restore, which handles this all for you, you'll have to use a workaround like the one you suggest.