You can't get any energy out of a battery until you put energy in ... alas more in than out per the laws of thermodynamics.
Solar in similar: it depends utterly on the whole industrial infrastructure, but is not continually tied to the grid like a power line.