Using lithium batteries as photovoltaic batteries