It is a Quick App to track presence based on the status of the device's MAC address in the UniFi controller. The app emulates a binary sensor. "Unknown" and "Home" correspond to the sensor's status "true", "Away" corresponds to the sensor's status "false".
The following variables are mandatory:
- controller - address of controller including protocol and port (e.g., https://192.168.1.10:8443/)
- site - name of the site defined in controller and where MAC address will be searched (e.g., default)
- login - username to log into the controller. I recommend creating a dedicated user with read-only access to the controller (e.g., fibaro)
- password - self-explanatory
- frequency - how often to poll controller (in seconds, e.g., 120)
- mac - MAC address of the device that will be tracked (e.g., d4:a3:3d:c2:b9:e4)
The following variables are optional:
- away delay - the app changes status for MAC address from "presence detected" to "presence not detected" if the UniFi controller "sees" the mac more than "away delay" seconds ago. If the variable is not defined, then the value of "frequency" is used as "away delay".