Conceptual problem with delayed response

Hello,
I've build a flow to control a power storage system at home.
I use a switch node from node-red-dashboard to display a binary state (ON | OFF) and to switch the binary state from ON to OFF or vice versa. This causes problems because the change of state will be executed at the power storage system (due to the device) with a certain delay. Before the change happens the flow will be executed again and displays the old state using the switch node. This again will be interpreted as a rollback of my previous action.
I think about separating the display of the state (text item) and the action tho change the state (button).
Is there a way to use the same switch node for both purposes (display and action) with the help of variables or different msg.topics?
Regards Juergen

If I understand you correctly, you can set the switch to not pass input messages through, and to Show State of Input. Then the icon will not change till the new state comes back.

I suggest a switch to show what you have requested and an LED node-red-contrib-ui-led to show what it's actually doing.

1 Like

How do I set the switch to not pass input through?
Thank you for your advice!
Regards Juergen

Double click the switch node and you should see the option there.

image

OK. I'ver seen this option before but was confused by the fact that there is also a switch node in the category "function". Thanks !