Dimming a PWM output

I have a sonch 4ch pro with the basic configuration (


)

I connected an external button to the “Sonoff 4CH Button 1”.

I would like that if button 1 is pressed, the intensity of the LED (blue_led) will go up to the maximum level and then go down again. If I release the button, the intensity of the LED must remain the same as when I released it

How can this be done?