Just thought that you’d be interested in the Tasmota Edge driver.
It’s probably simpler, and covers all you need.