Hybrid inverters charge the batteries using solar power during daylight. If the battery goes low, or during insufficient lighting, they charge the batteries from the Grid. These systems automatically switch between the solar power and the Grid.
This is great way of replacing polluting diesel generators. Your electricity bill will be reduced and your diesel bill will be eliminated.