Dynamic TTS based on device that triggered scene

Hello,

I was hoping someone would be kind enough to help me with this. Currently I have this code for when a door sensor is triggered:
luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{Text=“Door opened”, Language=“en”, Volume=40},
13)

I would like the code to make the sonos say which door was opened. I know how to do this with a separate scene for each sensor, but I was hoping I could make this one scene dynamic. Is there a way to add to this code the name of the door sensor that triggered the scene for the sonos to say it?

Thanks in advance

There isn’t any way for Lua in a scene’s Luup tab to determine where the trigger came from.

In UI5, you can add Lua to each trigger using the Luup Event tab. This allows you to set a global variable that can be used in the main scene Lua to tell which trigger fired.

This is not currently possible in UI7 but may be reinstated in a future release.

Rex,

Thanks for letting me know and the help. I’ll just make a separate scene for each door for now.

Thanks!