Created
November 7, 2018 17:45
-
-
Save cslauritsen/08eb8df6bb83decf9025a5e1e2f90e50 to your computer and use it in GitHub Desktop.
Rules for Wasp-in-a-Box algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule "Norman leaves" | |
when | |
Item PresenceNormanGeofence changed to OFF | |
then | |
if (PresenceNormanWasp.state == ON) | |
{ | |
sendCommand(PresenceNormanGeofence, ON) | |
} | |
end | |
rule "Norman presence detected" | |
when | |
Item PresenceNorman_PhoneWifi changed to ON | |
then | |
if (PresenceNormanGeofence.state != ON) // just in case | |
{ | |
sendCommand(PresenceNormanGeofence, ON) | |
} | |
if (PresenceNormanWasp.state != ON) | |
{ | |
sendCommand(PresenceNormanWasp, ON) | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
taken from https://community.openhab.org/t/best-presence-detection/11966/12