Stop two flows from triggering each other

I have two flows. If you change the thermostat to heat_cool mode, it turns on the hvac schedule boolean in homeassistant.

If you turn on the hvac schedule boolean in homeassistant, it changes the thermostat to heat_cool mode.

What is the best way so they don't trigger each other?

I've used the 'Traffic' in the past, but it gets very messy quick. I'm wondering if there is a flag, to tell when the user actually clicked the boolean button in HomeAssistant, vs when the node-red automation actually updated it. Then I could check 'If a human changed this, then continue'. OR if there is a better way to handle this?

add a topic to the messages to differentiate them. Then you can use a switch node and re-direct msg flow based on the value of topic.

e.g. "node-red" for node-red messages and "home-assistant" for HA messages.

NOTE: it doesnt even have to be the topic - any parameter if msg is possible.

e.g. you could set msg.src = "home-assistant" or msg.src = "node-red" then in a later switch node see if msg.src is == to "node-red"

I was trying to think of the cleanest steps. For this simple flow, just checking the entity before hand to see if it needs changing, fixes my problem of the flow trigger the other flow.

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