Mains timer hack.

It is hard to find one-shot mains timers at a reasonable price.
Timers which continuously cycle are cheap and common.
The hack is for charging my ebike. The charger is crappy it that is draws a fair bit of power after charging is complete.
I don't want it sitting there for days or weeks wasting power.
The hack was the take a cheap mechanical timer and modify it so the timer is powered by the switched output of the timer.
Once the timer turns off the power the timer stopped until manually restarted.
Image Timer with cover removed.

Image Inner working of timer.

Image Timer hacked to stop after time period. Note that the red wire is not rated for mains voltage so it has to stay away from other conductors.