%device or %value% not announcing

Am i doing this correct?

Using the built in button controller app, I want when i press button it announces on a near by echo device the switch is on or off

{button press}
Toggle: Fountain water feature
Notify Echo - office: 'Fountain water feature %value%'

This just announces fountain water feature and not the value. Should this be announcing either off or on using the %value% command?

Thanks

No, because %value% and %device% refer to the triggering device and it's value (i.e. the button).

3 Likes

The %device% and %value% are designed to be used with triggers. Given the trigger here is a button, you won't get what you need. However, since the fountain water feature has only two possible values, you can do this with a simple conditional.

3 Likes

So what you want to do is create a local or hub variable, set the variable to the state of the switch, and then use that variable in your notification.

4 Likes

Thanks guys, I’ll give that a try