Zigbee plug power restored as a trigger event?

I have a smart plug, plugged into a socket. I would like to know in the event it's been turned off at the wall or unplugged, then later plugged back in again or has power restored to it. The purpose of this is that the plug in question powers on in its last known state and I'd like to make sure it is turned off when it first receives power. This probably won't be due to a house-wide power cut so hub startup won't help.