Icing and fogging on optical material surfaces bring various problems in daily life. Recently, some photothermal coatings have been reported to prevent the condensation or freeze of water droplets by increasing the surface temperature. However, it is a great challenge to apply them in practical conditions due to their opaqueness and poor mechanical wear-resistant property. In this work, we constructed a robust transparent photothermal omniphobic coating with a simple dip-coating technique. In the coating system, photothermal polypyrrole nanoparticles are introduced into inorganic silica networks, and then polydimethylsiloxane (PDMS) brushes were grafted on the inorganic silica layer to endow the surface with omniphobicity and stain resistance. The transparency and photothermal capacity of the coating can be regulated by the deposition times of the coating. In addition, the coating has an excellent anti/deicing property and reduces ice adhesion obviously due to the existence of "liquid-like" PDMS brushes. More importantly, the coating presents outstanding mechanical wear-resistant and self-lubricating properties that can endure several thousand friction cycles without performance loss. The mechanically robust photothermal omniphobic coating gives a feasible approach to anti-icing and antifogging of transparent substrates under sunlight irradiation.