It appears that I need code like this:
- Code: Select all
d = indigo.devices['Sonos']
sp = indigo.server.getPlugin("com.ssi.indigoplugin.Sonos")
props = { 'mode':'Play Now',
'setting':'FV:2/9', # id of the favorite to play
}
sp.executeAction('actionZP_SonosFavorites', d.id, props)
When the plugin starts up, it calls its internal GetSonosFavorites routine and builds the Sonos_Favorites global list (containing, among other things, the name of the favorite and the id), but there doesn't seem to be a way for my trigger to convert from the favorite name to the id - I haven't found a way to get the ids from the plugin.
What am I missing?
Thanks.