3-Axis State

Hi All,

I’m trying to write a smartapp that continually monitors a smartsense multi for the state of a single axis. When the axis is in a certain range, it activates a switch. I can’t find any code related to this. Any help would be greatly appreciated.

Thanks!
Shane

@shanemhoffmangmail-com This uses the 3-axis sensor, but it does not check a range:

Once the 3axis event fires, you’d just need to:
def orientation = sensor.latestStaet(‘threeAxis’)

You can find a specific axis value with:
orientation.xyzValue.x

Edit:
Here’s a pretty good example:
https://smartthings.zendesk.com/entries/21603744-Garage-Door-Monitor