How to switch between solar photovoltaic and electricity