The Sonos-Part of the documentation is here. The “say”-command will use the Sonos Notificationsound.
This is the rule I’m using (SayCommand is the string item with the text):
val Number NotificationVolume = 20
rule "SagEtwas"
when
Item SayCommand received update
then
var string AudioSink
switch AudioSink {
case Lautsprecher.state.toString=="Küche" : AudioSink="sonos:PLAY1:RINCON_Bxx1400"
case Lautsprecher.state.toString=="Wohnzimmer" : AudioSink="sonos:PLAY1:RINCON_Byy1400"
case Lautsprecher.state.toString=="Gästezimmer" : AudioSink= "sonos:PLAY1:RINCON_Bzz1400"
default:AudioSink="sonos:PLAY1:RINCON_Bxx1400"
}
gPlayer_NotificationVolume.allMembers.filter(s | s.state!=NotificationVolume ).forEach [item | item.sendCommand(NotificationVolume)]
say(SayCommand.state.toString,"voicerss:deDE",AudioSink)
end