Getting settings from Setting API?

This is my code:

As you can see, I have configured a settings option, setting a zone. I need to get this to use in my program, how can i do this?

You can access the set zone via

Is that getting it from the setting variable or the title variable when i push to the layout?

When using, I get undefined. @Jan_Koudijs

The name you specify behind setting: is the field name within the settings object, the title is the text string that gets displayed in the settings dialog. should get a value after you have selected a zone and saved it. Within the makelayout function you should use the local settings parameter.

@Jan_Koudijs now using but still getting undefined when trying console.log(

At first start will be undefined because no zone selection has taken place. So you have to check if zone is actually defined before accessing it. Something like:

if ( && zone.zone_id ===

If that’s still not working then you have to add more console logging to see what is going on.

You also have some duplicate code (two makelayout functions, two roon.start_discovery calls), this can give unexpected behavior.

Guess this is all I can do, I hope it helps.

I find no zone_id in the zone. I found this
“output_id”: “1701f205bee303a1977878f08b35fbb43fe7”,
“name”: “AudioVolver”
Why output_id instead of zone_id?