You are right, the previous schematic had a mistake.
This is the correct schematic.
As for powering the MCU, I do have a flyback converter directly from the AC mains to the 5V supply.
My only issue is to translate the AC pulse from the push button.
Will the new circuit work?
In open state the GPIO is pulled low with R2, when the button is pressed - the GPIO should sense a voltage via R1, I will set R1, R2 values to produce around 5V through them.
As for isolation, the DC part is installed inside the fan without any human access. is it still necessary?
Thank,
Tomer