What is the syntax for reading a device presence state? I know how to do a switch but I can't seem to figure out how to do it for a presence - This doesn't work:
if (device.currentState("presence") == "present") {
departed()
} else {
arrived()
}
}