Custom AudioProcessorValueTreeState attachment

I have a question about listeners. I’m trying to attach a custom UI component to a plugin parameter. When the component’s value is modified by the user, the former sends the new value to the plugin parameter (using a broadcaster -> listener event). Now I would like to implement the communication in the other direction, which means using the AudioProcessorValueTreeState::addParameterListener method to link the parameter to my custom UI component. But as the parameter sends a new value to the UI component, the latter will get changed, and therefore broadcast its change back to the parameter, resulting in an infinite loop… There is probably a simple workaround to this situation. Can someone help me?

We’ve got something in the pipeline that will make customising attachments much easier.

However, until that becomes available, can you simply return early if the new value is the same as the old value?