Referencing Current States of Webcore Presence Devices


#1

Hopefully this will be an easy “yes or no” question, so here goes:

Is it possible to reference the Current State of WebCoRE Presence Device in local or global variable?

image

Ideally, I would like to create a local or global variable that would change based on the currentPlace of my WebCoRE presence sensor.

The end result may look something like this:
image
Where {$currentPlace} would represent the state of the sensor, and the variable “dad_currentplace” would use that reference to output “Work”.

Any help on this would be greatly appreciated. :slight_smile:


#2

Yes


#3

Great, how? Each time I attempt to reference “currentPlace”, I get this:


#4


#5

I think if you put that in an expression it will work,


#6

[presence name:currentPlace]


#7

I just took the long way, but I like switches as it lets you have other things jump off of the true result.


#8

You could also make it something like
if dad’s currentPlace changes Then Using location Set @dads_currentplace = {[device: currentPlace]} End if

Then this will be blank if you are not anywhere or have the name of any places you have or add into the future

Edit:
It was brought to my attention by @bangali that it can also be a used with physical device and selecting the sensor and attribute


#9

That’s exactly what I was hoping for, and it worked!

Thank you. :smiley:


#12

Awesome! Glad to hear it. I updated the solution post above. Use of an expression is not necessary as you can reference the physical device itself.