## 2 Experimental
### Thin Film Characterization  
The surface morphology and the cross-sections were analyzed by scanning electron microscopy (SEM) in a Zeiss MERLIN (Carl Zeiss Microscopy Deutschland GmbH, Oberkochen, Germany) at an emission current of 78-100 pA and an acceleration voltage of 2-5 kV. The elemental composition of the films was examined in the Zeiss MERLIN at an emission current of 2000 pA and an acceleration voltage of 9 kV by energy-dispersive X-ray spectroscopy (EDX) using a X-Max 50 mm\({}^{2}\) EDX detector (Oxford Instruments, Abingdon, UK). Quantification of the elements W, O, Sn and C was carried out with the software Aztec 4.3 (Oxford Instruments, Abingdon, UK). The crystallinity of the WO\({}_{3}\) thin films was investigated by grazing incidence X-ray diffractometry (GIXRD) using a PANanalytical X'Pert Pro MRD instrument (Malvern Panalytical B.V., Almelo, Netherlands) with Cu-K\(\alpha\)-radiation. In situ GIXRD was performed during step-wise heat treatment of a film from 30-700 \({}^{\circ}\)C to determine the crystallization temperature. The diffractograms were analyzed using the software HighScore Plus 3.0e. The thickness \(d\) of the films was measured with an Alpha-Step profilometer from Tencor Instruments (Milpitas, CA, USA) as an average over at least 10 samples at different sites and verified by the analysis of the cross-section of the samples by SEM. Using the Alpha-Step profilometer the surface roughness was also determined. Ellipsometry of the films was measured on polished silicon wafers by means of a variable angle spectroscopic ellipsometer (VASE) from Woollam (Lincoln, NE, USA) and the data were fitted with the WVase32 software. The thickness \(d_{\mathrm{E}}\) and the porosity \(P_{\mathrm{E}}\) of the films was determined using the Bruggeman effective medium approximation and the compact WO\({}_{3}\) film as reference sample. Krypton physisorption measurements were performed in an automated gas sorption station (Autosorb iQ2, Quantachrome Corporation, Boynton Beach, FL, USA) at 77 K by using a cryostat (CryoSync, Quantachrome Corporation, Boynton Beach, FL) in a relative pressure range of \(p/p_{0}\) = 0.05-0.30 to obtain the surface areas of the films. Thin films prepared on silicon wafers were cut and filled into glass tubes with a cylindrical end. Surface areas were determined by applying the Brunauer-Emmett-Teller (BET) model supported by the software ASiQwin 4.0. The mass of tungsten in the different films \(m\)(W) was determined by microwave plasma atomic emission spectroscopy (MP-AES) with a 4210 MP-AES from Agilent Technologies (Santa Clara, CA, USA) using a nitrogen plasma. The films were dissolved in a defined volume of 5% NH\({}_{3}\) solution overnight. Sodium tungstate dissolved in NH\({}_{3}\) solution was used for calibration purposes. The mass of tungsten oxide \(m\)(WO\({}_{3}\)) in the different thin films was calculated using the content of tungsten \(m\)(W) measured by MP-AES, the molar mass of W, and that of WO\({}_{3}\). \(m\)(WO\({}_{3}\)) was then used to calculate the density \(\rho\) of the films based on the volume \(V\) of the films as the product of the geometric film area \(A\) and the thickness \(d\) of the films plus a film volume existing between FTO crystallites. Material that was spin-coated onto the edges of the substrates, which would lead to higher \(\rho\) than the true value was considered in another \begin{table}
\begin{tabular}{c c c c} \hline
**Film Type** & **Polymer** & \(T/^{c}\mathbf{C}\) & **_t/h_** \\ \hline WO\({}_{3}\)\(\,\mathrm{\SIUnitSymbolMicro}\)comp & None & 250 (350; 450; 550) & 1 \\ WO\({}_{3}\)\(\,\mathrm{\SIUnitSymbolMicro}\)400 & PEG 400 & 250 & 1 \\ WO\({}_{3}\)\(\,\mathrm{\SIUnitSymbolMicro}\)p600 & PEG 600 & 250 (350; 450; 550) & 1 \\ WO\({}_{3}\)\(\,\mathrm{\SIUnitSymbolMicro}\)mp & PIB\({}_{50}\)-b-PEO\({}_{45}\) & 300 & 12 \\ WO\({}_{3}\)\(\,\mathrm{\SIUnitSymbolMicro}\)mp & PIB\({}_{50}\)-b-PEO\({}_{45}\) + PEG 600 & 300 & 12 \\ \hline \end{tabular}
\end{table}