I installed a "whole house" generator panel (10 breaker 15,000 watts) and the garage, housing the sprinkler controller, is one of the switchable circuits. So, if I switch on the generator, such as during a brown out in the heat of summer, the sprinkler system works.
(Don't neglect the garage. Though possible, it makes it hard to get the car out if the opener has no power.)
Obviously, if I'm not home, there is no one to connect and turn on the generator, but we're always home.
Panel connection to main breaker panel:
60 foot 6 gauge x4 conductor cable to generator:
Generator stored in garage by back door:
Generator in position. Part of the engine and the exhaust sit outside: