Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
It also works on Sonoma 14.7.6 too. I suspect it's because my MBA's firmware was upgraded (to Sequoia) and then I downgraded the OS.
 
Mutton Jeff, just to say thanks for posting that. I did know there was such a script but had been unable to find a reliable source.
I only wanted the boot at opening the lid in my case for customs checks and accidental opening. The Terminal script for that works like a charm for my M1 on Sequoia.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.