How to link energy storage with electricity