Skip to content

Commit

Permalink
specific device threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
nitaybz committed Nov 8, 2020
1 parent 6b5212f commit 083ef6d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"devices": [
{
"name": "my iPhone",
"mac": "cc:29:f5:3b:a2:f2"
"mac": "cc:29:f5:3b:a2:f2",
"threshold": 5
},
{
"name": "my iPad",
Expand Down
2 changes: 1 addition & 1 deletion lib/accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OccupancySensor {
this.network = network
this.log = platform.log
this.api = platform.api
this.threshold = platform.threshold
this.threshold = !config.threshold && config.threshold !== 0 ? platform.threshold : config.threshold
this.mac = config.mac.toLowerCase()
this.ip = config.ip
this.name = config.name
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-network-presence",
"version": "0.0.4",
"version": "0.0.5",
"description": "Homebridge plugin that provides occupancy sensor for devices presence in your network",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit 083ef6d

Please sign in to comment.