MQTT triggering notifications on deploy

I'm sure this must be a simple fix.

HA trigger node automatically disconnect then reconnect on deploy of changes in Node Red.

Now I've switched to MQTT states for triggers. When I deploy changes on any flow, I'm getting notifications from the flows with MQTT states.

Had a bit of a search in the forum. Cant find a fix.

Not sure what your problem is... that you are getting notifications or that you aren't... - anyway - you can set the deploy to only deploy changes to nodes rather than the whole flow so that the mqtt nodes shouldn't stop and start on a deploy if they haven't been edited.

Will need to do partial deploys. Didnt know that was a feature!
Sounds good.

Thanks D :ok_hand:

i had the same problem with domoticz.

i made a script in domoticz which sends out all the device states over MQTT
i trigger that script with an inject node(which get's triggered when you deploy a complete new flow.

this way i always have the current state, even when i deploy a complete flow or when i restart node-red.

On the publish for the triggers have you specified Retain? If so then any time a client connects and subscribes it will get sent those triggers. If you don't want to happen then don't set Retain when you publish them. In addition you will have to remove the already retained values for those topics. To do that, if you use mosquitto, you can do
mosquitto_pub -t "the/topic" -r -n

Will take a look! Thanks