Howdy. New to Node Red and trying to figure out the best way to do this with the Hubitat nodes. I'd like my lights to turn off when I turn on my TV (currently monitored via z-wave plug), then go back to their previous state when the TV turns off.
I have this mostly working by having the power monitor turn on/off a virtual switch if it passes a power consumption threshold (I tried skipping this by just using a switch node for if power >50v, but that kept triggering the flow repeatedly every time it reports).
Open to feedback on the entire flow, but as it stands right now the thing that's hanging me up is getting the flow to save the current state of my lights before turning them off, and then returning to that state. What's happening is that it just turns both lights back on, regardless of whether they were on before or not.