Power Off Dell R720 from Home Assistant

I actively have a Dell Poweredge R720 running Proxmox, with my home assistant VM as one of them. Actively, my server is on an uninterruptible power supply, but will only last for 10 minutes if there is a power outage. Is there a way I can take the data from my UPS (from NUT) when it detects a power loss to gracefully shut down my server? Is there a way to do it through iDrac 7 or Proxmox?

NUT can be setup to shutdown server

Or maybe use command line integration