Querying a State/Status


(Convinced ST will never be unbroken…) #1

Hey All,

Starting to get the hang of this but am once again stuck.

I have a smartApp triggered on a presence sensor that sets the states of various devices when the event is “not present”. During that event I also want to check if the garage door (SmartSense Multi) is open at the time of this presence sensor event, and if so, send me a notification.

Not seeing a way to do this without an event handler for the multisensor, which of course triggers whenever the door is opened or closed.

Any thoughts?

Thanks,

Scott in Pollock


(Convinced ST will never be unbroken…) #2

Nevermind… figured it out.


(Ben Edwards) #3

You should post the solution you found because others may have the same issue . :smile:


(Convinced ST will never be unbroken…) #4

Fair enough. The solution was to define the following and call it from within the presence sensor event handler:

def checkGarage(evt) {
def latestValue = multisensor.latestValue("status")
}

@Ben I am still looking for some kind of command/function reference. Take for instance setLocationMode(). How would a newbie even know this exists?


(Ben Edwards) #5

Hoping some of the older reference documents might help.

These are available from here.