Reducing the interval_seconds for nmap_tracker

I’m using Nmap Tracker - Home Assistant which can only be configured through the UI. The problem is that interval_seconds is required to be at least 10 seconds. But I would like to set it to 5 or even 3 seconds to improve detection speed when my phone registers in the wifi. I’m only scanning for my phone (a single IP), so scanning every 3 seconds should be fine I think.

Can I somehow overwrite the value?

I don’t use nmap, but overriding the scan interval for any UI configured integration requires pretty much the same procedures - disable polling & set up an automation to update the entity

This post for the ping integration lists all the steps clearly. You can thank @petro if it works for you.

I’m a bit confused by your reply. Because the interval is already configurable. It just seems that there is a minimum value of 10 being enforced in the UI configuration.

I believe the related code is here: core/homeassistant/components/nmap_tracker/config_flow.py at b6afbe4b29136af6b1316a7cc63310cc1cc8afa1 · home-assistant/core · GitHub

vol.All(vol.Coerce(int), vol.Range(**min=10**, max=MAX_SCAN_INTERVAL))

So I’m wondering why this was set to 10. Maybe there are technical reasons that I’m unaware? Otherwise I think it should be okay to set to a lower value, the scan doesn’t take as long usually.

Like I said, I don’t use nmap. I based my reply on the fact that you can bypass the hardcoded scan interval on other UI integrations.

Just try it out and see if it works for nmap - it only takes a couple of minutes to set it up and can be easily reverted.

Sorry, I misunderstood you - you meant I should not use nmap at all. Got it. I’ll look into that.

1 Like