From 925a3b525e0f70f189435ec6614325a6d19d193a Mon Sep 17 00:00:00 2001 From: oznu Date: Fri, 9 Feb 2018 20:07:11 +1100 Subject: [PATCH] fix issue tracking devices on guest networks --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3380261..cfa7a6e 100644 --- a/index.js +++ b/index.js @@ -33,13 +33,13 @@ class OccupancySensor { }) this.unifi.on('connected', (data) => { - if (this.watch.includes(data.user)) { + if (this.watch.includes(data.user || data.guest)) { return this.checkOccupancy() } }) this.unifi.on('disconnected', (data) => { - if (this.watch.includes(data.user)) { + if (this.watch.includes(data.user || data.guest)) { return this.checkOccupancy() } })