@dc42 Thank you for worrying!
I did some experiments:
1- It works if I make two simple macros.
The first macro I run when the hot end has 80 degrees for example, it contains the M81 S1 command, the second macro I run with the M80 command until the hot end cools down
No power outage!
2- It also works if I put the M1 command in the final print script, and the M81 S1 command in the file "sleep.g" and then launched the macro with the M80 command, the shutdown does not happen.
3- I do not put the M1 command in the final print script, however I turn on the ATX-off checkbox in the web interface, and here is the problem, the printer is not turned off in any case! The ATX-off checkbox has no effect on turning off the printer power.