You can use an old ups with a dead bat, change the battery to a much larger capacity and connect it to your lights. Every brownout your lights will automatically change to battery mode and go back to standby mode when the grid returns.

Just dont expect the ups to charge the batteries overnight. Some ups on charges the batteries at 1 or 2 amp