Anyone that gets a fright at wee hours of the morning when they say Alexa and she responds with 100% full vocal force ( set too 100% volume from a previously triggered security warning or such and volume didn?t return to previous setting volume setting) can use the below code addition to return volume to xyz setting after tts finish?s
The below returns volume to 50% for device 176 just need to ensure the luup.sleep (milliseconds value) has to be longer than the tts or the volume reduces mid speech
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
{Text="The Washing cycle has completed", Language="en", Volume=75},
176)
luup.sleep (4000)
luup.call_action('urn:upnp-org:serviceId:RenderingControl', 'SetVolume', {DesiredVolume = 50}, 176)
Credit and thanks goes to Member A-Lurker (creator of the broadlink plugin and others)
Of course use at your own risk as I tweaked it and I am no luup programmer :-)