Starting from Android Oreo the "Keep Wi-Fi on during sleep" setting was removed and thus, PieFi was born.
PieFi is a Quick Settings Tile.
With PieFi you can regain control of your Wi-Fi, saving battery, data, and finally rest easy to get a good night's sleep.
In addition to the option being unavailable, starting from Android Pie, Wi-Fi cannot be modified if Airplane Mode is on, hence the name PieFi. This is a problem to anyone who regularly uses it like I do.
This additional feature requires root.
Initial release.