Good afternoon,
I’m trying to create a flow in node-red that checks the state of a current entity and uses that in the initial action. This first step isn’t that difficult, using a current state node for that. The next part is what I can’t figure out.
Situation
I have a wall switch connected to a shelly that triggers the lights in my kitchen. It’s set up as a detached switch to ensure it no matter the position, switches the lights described in my current flow.
My kitchen consists of two groups - the bar and kitchen spots. The bar lights are ‘on’ when the scene ‘zithoek’ is turned on. When I then use the wall switch, the kitchen spots go on but the bar goes off, due to the setup of the shelly, ‘switch’ instead of on/off.
I would like to integrate that state of the bar lights, created the following. When the bar lights are on and the switch is used, turn on the kitchen spots - so all lights are on. When the switch is used again, turn off the kitchen spots but leave on the bar, as these were on before.
Does anybody have a suggestion on how to do this? It must be easy but somehow I can’t figure it out…
Tried google and the forum but can’t seem to find the right example.
found this:
- Example 1 - saving and restoring states by zachowj
- Example 2 - but use cases are different and not sure how to switch to mine if feasible at all.
Looking for a similar example or the golden tip!