When the sun shines anywhere across your roof, the solar panels installed generate electricity sufficient enough to run household appliances directly. If the demand exceeds the available solar power, the remainder will be drawn from the grid. At night, when there is no solar generation, grid electricity is usually required. This can be done for the most part because there is a battery storage system. There is a complete loop as it is. The solar energy storage is charged by batteries during the day, and at night, the stored energy is used, lowering or eliminating grid dependency. In theory, this arrangement could make you completely grid-independent, particularly if you have an electric vehicle that you can charge at home as well.