Question about %devices%

i have made a virtual switch that when triggered checks to make sure a list of doors and windows are closed. is there a way to make alexa announce what "door" or "window" is open?

i got her telling me "something is till open" but if i put in "%device%" she says "check list" is still on.
"check list" is the virtual switch i use to trigger

%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. :slight_smile:


OMG i think i had your announcer app installed and didnt relise it. that is amazing app. thank you.

i have noiticed something straight away. some contacts dont "get announced" but they do in the "test button"