PSU Control Pre-off GCODE

Good morning. Has anyone had any luck with PSU Control pre-off gcode? I am trying to run a simple homing operation (G28 X Y Z) to automatically home the printer before power off. The plugin is sending the G code command, as shown by the logs, but it isn't waiting for the command to complete before powering off. So the printer has enough time to move a few mm and then powers off.

I tried to add an additional Gcode to wait 10 seconds (G4 S10) but this doesn't help. The plugin blasts the printer with both commands and then immediately powers off without waiting for the printer to finish.

Just wondering if anyone has gotten this to work, or if I need to add some other GCODE that waits for the home operation to finish properly.

I am using PSU Control with Home Assistant to do the switching of a connected smart plug.

Not sure if this is a bug or a "me" problem. Thanks in advance.