Help with Node Red contexts

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.

And here's how I have the Change nodes set up:

There is as node for this!

2 Likes

Of course there is... thanks :slight_smile:

And since you are going down the Node Red rabbit hole and might not have found this other thread, its a good one.

1 Like

Thanks, I've definitely seen that...in fact, I already had that RBE palette installed, I just didn't know it - likely got it from that list.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.