IMHO Israel did it in part to help the IDF presence in Gaza (good), but worded it (bad) in a way to do PR for the Jew-hating world to chew on.
They should have said that power is restored only as long as the IDF needs it and will be shut off again when the IDF no longer needs it --- unless the Gazans surrender.
Israel is doing the right thing. Hamas is going to sabotage the power lines anyway so might as well put a happy face on things.