I didn’t infer it from the doc’s, I read the source code:
class FritzBoxScanner(DeviceScanner): #<-------- DEVICE SCANNER
"""This class queries a FRITZ!Box router."""
def __init__(self, config):
"""Initialize the scanner."""
self.last_results = []
self.host = config[CONF_HOST]
self.username = config[CONF_USERNAME]
self.password = config[CONF_PASSWORD]
self.success_init = True
..... etc
I then looked up that class in the __init.py and found that it ignores the following parameter:
CONF_TRACK_NEW = 'track_new_devices'
..... etc....
NEW_DEVICE_DEFAULTS_SCHEMA = vol.Any(None, vol.Schema({
vol.Optional(CONF_TRACK_NEW, default=DEFAULT_TRACK_NEW): cv.boolean,
vol.Optional(CONF_AWAY_HIDE, default=DEFAULT_AWAY_HIDE): cv.boolean,
}))
PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({
vol.Optional(CONF_SCAN_INTERVAL): cv.time_period,
vol.Optional(CONF_TRACK_NEW): cv.boolean,
vol.Optional(CONF_CONSIDER_HOME,
default=DEFAULT_CONSIDER_HOME): vol.All(
cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_NEW_DEVICE_DEFAULTS,
default={}): NEW_DEVICE_DEFAULTS_SCHEMA
.... etc ...
class DeviceScanner(object):
"""Device scanner object."""
hass = None # type: HomeAssistantType
def scan_devices(self) -> List[str]:
"""Scan for devices."""
raise NotImplementedError()
def async_scan_devices(self) -> Any:
"""Scan for devices.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.scan_devices)
def get_device_name(self, device: str) -> str:
"""Get the name of a device."""
raise NotImplementedError()
def async_get_device_name(self, device: str) -> Any:
"""Get the name of a device.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.get_device_name, device)
Notice how the device_scanner does not inherit from DeviceTracker.
Anyways, there are some areas of the code that are a mystery to me so I could have read it wrong. Either way, it appears as if the config accepts the parameter but the device does not use it.
Anyways back to your issue at hand, it doesn’t look like there is a way to force your router to refresh and get new known devices. the service device_tracker.see appears to only update devices that you’ve already collected.
You may want to turn on debugging for logger to see what information goes to the log during start up. With that information, we can see where the component is failing. We need to rule out 2 possibilities: failure of the component or failure of your device.