def get_scanner(hass, config):
    if not validate_config(config,
                           {DOMAIN: [CONF_HOST, CONF_COMMUNITY, CONF_BASEOID]},
                           _LOGGER):
        return None

    scanner = SnmpScanner(config[DOMAIN])

    return scanner if scanner.success_init else None
Validate the configuration and return an snmp scanner.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/device_tracker/snmp.py/get_scanner