Quick question on using device variables in voice announcements


#1

1) Give a description of the problem
Voice does not state previous location mode and new location mode

2) What is the expected behavior?
voice announcement “Xyz home has changed from mode 1 to mode 2”

3) What is happening/not happening?
voice announcement “Xyz home has changed from to”

**4)


#2

Well, you can use $locationMode for the current mode. However, where are you getting the $previousState and $currentState system variables? I don’t see them in the list of those that are available.

But if the old mode system variable does not exist…you could just keep track of it yourself. You just have to let it change once so that it gets stored (or configure it in the GUI on the piston interface). But the logic would go something like this:

define string oldMode;

IF Location mode changes and…

then
speak text “home mode has changed from” oldMode to $locationMode
set variable oldMode = $locationMode

Like I said, initially oldMode will be empty…but once it changes one time it will fall in line properly.


#3

Easy - thank you sir.

I found those other variables in the variables drop down - I guess they are all not usable. Thx for the solution!