I would like to have a template sensor that displays the master sonos speaker. I have 2 zones with speakers for my livingroom and kitchen. Sometimes these get controlled from HA and sometimes from the sonos app. Within HA had an automation that would respont to the event that creates the group. but whenever you join them trough the Sonos app that event doesn’t show.
Yet the mini mediaplayer card does detect what device is master, also when it’s done from the Sonos app.
I asked ChatGPT to create a template sensor but the answer I got doesn’t work. The attibute it uses is not on any of my devices.
For my needs it was important to know when the speaker is not the master so I can hide it fromthe GUI and only display the master speaker. I use this conditional card configuration: