Smart Lighting Features

My dream app would be one that turns lights on at a sunset with a random offset daily, and then turns lights off at a random time between 11 and midnight. That would be the “away” or “vacation” timer that I’d use if something like that was available. Has anyone come across an app similar to this?

install rule machine and use it to do this.