Add manual scan service to NMAP device tracker integration

I would like to be able to trigger an immediate scan for the NMAP device tracker. Ideally, some kind of service call, which I would like to use in automations triggered by “suspicious” events, like a door opening/closing, vehicle departing/arriving, that kind of thing.

Basically, if there’s a precipitating event that might mean that people have arrived or departed, I don’t want the NMAP device tracker to wait out its full polling interval before it notices.

What is wrong with

service: homeassistant.update_entity
target:
  entity_id: device_tracker.nmap_tracker_aa_a0_01_0b_d5_cb
data: {}

1 Like

Does that work reliably? I read in another post that it wasn’t working. (That post was dated 2020, with no recent activity…)

If it works, it’s a useful work-around for the device tracker integration not providing such a service. But it would be nice to be able to (also) trigger a re-scan for all of the devices tracked via the NMAP or device tracker integration, without needing to enumerate every entity ID manually. (In my case, it’s just two entities, but I can envision more complex use cases.)