I have successfully incorporated an Alexa smart home V2 node into a flow and got it to respond to a switch press on and off in the Alexa app running on my phone. When I attach a debug node to the output I can clearly see "on" and "off" displayed in the debug window. However this "on" and "off" is only fleeting and is not persistent. The debug window shows the last transition and not its permanent state (which makes sense because Alexa would not continuously transmit an "ON" or "OFF" signal, only a pulse in response to a button press). What I would like to do is to somehow latch the on or off condition or status in some kind of node which I could then input into a binary or boolean node then "AND" or "OR" it with some other condition.
Does anyone know how this latching function could be achieved?
Thank you for your patience as I am a beginner with Node-Red and js.