Hard coded context #10
Replies: 2 comments 1 reply
-
There is probably a better way. First one is to try and use the undocumented nodes This module has the particularity to maintain a cache of all the keys sent to node-red. Here is what the You can set any The other way to do this if you don't want to use that module, is to use a flow variable to maintain a cache as a mapping of Does that make sense ? |
Beta Was this translation helpful? Give feedback.
-
I have a need to change a button image based on an MQTT command. Traffic lights - red, amber, green. The command comes in on the MQTT listener, a switch and then set one button to the color and the other two buttons to an off image. The challenge I have is the context. The Red/Amber/Green change nodes have the context of their button (captured from a press to debug one time) hard coded. If I move or change one of the buttons, the context changes and breaks the flow.
So is there a better way of doing this? I tried with settings.id but unsuccessfully (I read that and switch on it for other flows).
Beta Was this translation helpful? Give feedback.
All reactions