This paper describes a method for the production of thin films of porous, hydrophobic sol-gel materials that can be made hydrophilic if treated in certain ways. The materials become hydrophilic when heated above a critical temperature, which can be varied by changing their composition. As water cannot penetrate into the hydrophobic material due to the hydrophobicity of the pore walls, the bulk material floats on water. When made hydrophilic the materials imbibe water, the pores fill rapidly and they sink. We demonstrate the use of these foam materials as detectors, using the transition from superhydrophobicity to imbibition as an indicator for maximum temperature reached, for concentration of surfactant or for measuring ethanol concentration in water.