Not exactly what you requested, but maybe it’s of any use: Check out the Piggy bank app. It can keep the power below a certain level, by switching off devices, starting by the least important ones, all configurable.
1 Like