def _set_default_duty_cycle(duty_cycle: float, type_id: int) -> float:
    """Set the default max rated temperature for mechanical relays.

    :param duty_cycle: the current duty cycle.
    :param type_id: the type ID of the relay with missing defaults.
    :return: _duty_cycle
    :rtype: float
    """
    if duty_cycle > 0.0:
        return duty_cycle
    return 20.0 if type_id == 4 else 10.0