Immobilization of an azobenzene-bithiophene compound on a gold surface leads to self-assembled monolayers with photoswitchable electrical properties.