Sonos Coordinator Attribute

Looking for a way to determine which speaker is the coordinator (master) of a Sonos group -

I have a number of custom automations which unjoin a speaker to play alerts or sounds, but it’s not easy to program for the sonos.join service as the master speaker is not always clear…

I know the sonos API exposes an is_coordinator attribute as the Plex integration uses it, but it doesn’t seem to be part of the attribute dictionary for the media_player entity itself.

Anyone know how to make this work? I’d be willing to modify the code and run the sonos integration as a custom add-on

Thanks