I have reviewed this git project and think it's a superior solution. Try it!
This script has been tested on Raspberry Pi OS, Buster (Legacy) and Bullseye only. This installation is simpler that the Waveshare provided instructions.
The supplied program will control the fan but for it to work you must slide the FAN switch on the HAT to the P0 position.
To use the script you can download the zip file and unzip it or, copy and paste the RAW version setup-poe-hat.sh and paste it into an editor. I reccomend you use nano setup-poe-hat.sh
in a Pi terminal or ssh session.
Then run bash setup-poe-hat.sh
When finished it will delete itself and any files needed only for installation. This script can be rerun. It will do a new install of the Waveshare software.
When complete a systemd service named poe-hat.service
will run and start on every boot.
to remove run these commands
sudo systemctl disable poe-hat.service sudo systemctl stop poe-hat.service rm -rf ~/.poe-hat
Hey guys!

I was also looking for a better alternative to the PoE HAT script. Unfortunately I did not find any alternatives that fully satisfy my needs.
So after seeing what @klamann created I got inspired and made my own version written in Rut ๐
Because it's written in Rust it has very low resource usage (I'm seeing less than 4MB memory and barely any cpu)
If you want try it out and let me know what you think!
https://github.com/jackra1n/RustBerry-PoE-Monitor