Keep state of sensor


I have a contact sensor, that tell me if something stop the rollercoaster from shutting down.

I want to add, that send the command on the right, only if other sensor is closed
However, That other sensor report to MQTT, and I cannot query MQTT for current state. I need to keep that as a variable or flag, that I can query during my flow.

How can I achieve that functionality ?

You could use a change node to store the state in a flow variable, when a message comes from MQTT.

Then in a switch node check the value of the flow var.

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