Pulling this out of the CocoHue thread since it's not really related.
I'm struggling to figure out how to use Rule Machine to return lights to a prior state after completing various actions. I want to use my inovelli switch to activate a Hue scene when turned on (in addition to simply turning on its physical switch), and then when I turn that switch back off, I want to return the Hue lights to their prior state (in some cases, this could be a scene, like during the evening - in other cases, this could be turning the Hue lights back off, for example the middle of the night).
I see that this could possibly be done via either variables or capture/restore, but I'm running into issues with both. For the variables, I can't figure out how to dynamically set a variable. Most threads I find show "device attribute" as the method for setting a variable based on current state (i think??) whereas what I see just appears to be manually setting the variable true/false based on my choosing. To be clear - I want to capture the state of Hue lights, when they were set outside of Hubitat, in the Hue app. I still have daily on/off automations for scenes in Hue app. So I don't have a logical way of setting the variable based on an action, rather, I need to capture/record a current state.
Then for capture/restore, I'm struggling with that one as well, because I can't figure out how to add both the initial trigger (ON) as well as the later follow-up trigger (OFF) within the same rule.
Essentially what I want to do is:
Inovelli smart switch ON: turn on; capture Hue group state; activate Hue group scene 'B'
Inovelli smart switch OFF: turn off; return Hue group to original scene 'A' if they were on, or turn them off, if they were off.