def applies(inverter, section):
    """Returns whether the inverter applies for given configuration section."""
    if 'IP address' not in section or not section['IP address']:
        return True
    if section['IP address'] == inverter.addr[0]:
        return True
    return False