I did similar for my lights, I just have a cronjob on my router that runs "sunwait" utility to pause until sunset, then uses curl to hit the "power on" endpoint of my $15 sonoff switch flashed with tasmota.
Manual on/off is just a URL shortcut in my chrome bookmark bar.
Basic but does what I want, turns light on when it starts to get dark, and simple bookmark on my laptop and phone to toggle power on/off manually.
The result is pure freedom. Setup: plug in and connect to Wifi, done. Control: install app, join home network, control lamps anywhere in the house. Automation: A lightweight, customizable app handles everything.
The app polls locally for available lamps, which works flawlessly for 5-10 devices.
Security might be a problem, but since everything lives behind a firewall, Iām comfortable with the tradeoff.