rmoesbergen / openwrt-ha-device-tracker

OpenWRT device tracker for Home Assistant that actually works
101 stars 18 forks source link

Whitelist (feature request) #23

Closed walberjunior closed 1 year ago

walberjunior commented 1 year ago

I have a request/suggestion. What do you think about having a whitelist? Maybe a filter option, with option to toggle between white/black list?

{
  "hass_url": "http://hassio.local:8123",
  "hass_token" : "<Home Assistant REST API Bearer Token>",
  "interfaces": ["hostapd.wlan0", "hostapd.wlan1"],
  "white_list": true
  "filter": ["01:23:45:67:89:ab"], <<< only track this devices
  "params": {
    "00:00:00:00:00:00": {
      "mac": "ff:ff:ff:ff:ff:ff",
      "hostname": "Dave",
      "dev_id": "phonedave"
    }
  },
  "offline_after": 3,
  "poll_interval": 15,
  "full_sync_polls": 10,
  "ap_name": "",
  "location": "home",
  "away": "not_home",
  "debug": false
}
{
  "hass_url": "http://hassio.local:8123",
  "hass_token" : "<Home Assistant REST API Bearer Token>",
  "interfaces": ["hostapd.wlan0", "hostapd.wlan1"],
  "white_list": false
  "filter": ["01:23:45:67:89:ab"], <<< don´t track this devices
  "params": {
    "00:00:00:00:00:00": {
      "mac": "ff:ff:ff:ff:ff:ff",
      "hostname": "Dave",
      "dev_id": "phonedave"
    }
  },
  "offline_after": 3,
  "poll_interval": 15,
  "full_sync_polls": 10,
  "ap_name": "",
  "location": "home",
  "away": "not_home",
  "debug": false
}
rmoesbergen commented 1 year ago

@walberjunior Thanks for the suggestion, this has been implemented in version 2.0.0.