Problem when creating a roon exension

I am working on a roon extension to control volume and source of the devices for my lyngdorf device. The issue I am facing is when we press play the convenience switch function of all the sources that are created is called. How can I make it only specific to one source, i.e only of the last played source to be triggered?

Is there some property which maintains the last selected source for a device?
How can I make my extension remember this in settings? i.e. can I change setting on the click of volume change or source change action?

what do you mean by “all the sources”?

I think I need a better picture of your setup + what your extension does.

Also, have you looked at the Meridian or Devialet-RS232 extension I wrote?