Yang and colleagues discover material for smart photovoltaic windows