%device% is the device that caused the rule to be triggered. Perhaps in whatever rule that you have that sets the virtual switch, you could capture that into a variable and use that in the rule that does the announcing. Or merge those rules into one.
Another approach might be a long list of IF/THEN to have Alexa say the right thing based on what's open, but that could essentially be duplicating the logic that sets the virtual switch.
ok thank you, i was gonna do the long list but there is a bout 15 devices wanna check. im really unsure with variables, i have tried to get my head around them but i really am banging my head against the wall with them. ihave tried to look at documentation and asked forums but i still cant get my head around it. one day it will slap me and ill be pissed it was easy lol
Your use case is basically the exact reason I wrote this app, if you're interested in trying custom code:
If not, my first post in that thread contains a rule that demonstrates how you could do something similar (local variable, append whatever you need to it, and then speak that at the end). I found that difficult to manage with lots of devices, so I wrote a custom app instead.