I have a US-8 switch on my 2nd floor that is powered by PoE from my 24 port switch and also passes PoE out to an AP. So by killing the PoE to that port on the 24 port switch, I power down both the US-8 switch and an AP. Then, for the other AP, I use a Kasa KP115 (~$24) with a PoE injector.
I use your driver to power down the Unifi PoE port and the Kasa controller by djgutheinz to power down the 2nd AP, resulting in 2 APs and 1 switch going off (and back on in the morning.)
All of it works flawlessly! (Unrelated, but I also have a few Kasa HS300 power strips (also ~$50) that djgutheinz's app also controls perfectly.)
The reason I like the Kasa's is because they're also power monitors so they work with my Sense energy monitor AND I can pump that power data from Hubitat into InfluxDB and monitor my power usage over time with Grafana.
You can see in this picture that between about midnight and 7:30am, I power down several unneeded items with Hubitat, the Kasa driver, and your driver.
