Optically switchable coatings