Abstract A description of the architecture of an electrooptical current switch is put forward in the paper, based on ab initio quantum-chemical calculations. The device consists of a conjugated polymer chain with a photochromic moiety placed in its vicinity. The molecule under consideration was σ-conjugated poly[methyl(phenyl)silylene] (which is a hole transporting material) substituted with a spiropyran derivative which undergoes a photochromic reaction resulting in production of highly polar merocyanines. The presence of polar species locally modifies the HOMO energies of the chain units giving rise to the appearance of ‘dipolar traps’ and, consequently, to a reversible modulation of charge carrier mobility. The carriers can also be trapped on the side groups provided their HOMO energy is lower than that of the polymer chain (‘chemical traps’ are formed in this case). The reported results are of general significance demonstrating that it is possible to modify electrical properties of an electroactive polymer in a controlled way by a reversible photochemical reaction resulting in the creation and annihilation of charge carrier traps.