Electrochemical copolymerization of 3-trimethoxysilanyl-propyl-N-aniline (TMSPA) with 2,5-dimethoxyaniline (DMA) was performed in 1M HCl aqueous solution for different feed ratios of TMSPA using cyclic voltammetry. The deposition rate of TMSPA–DMA copolymer is higher than that of PTMSPA but lower than that of PDMA. (TMSPA-co-DMA) film was deposited using electrochemical polymerization as conducting film on indium tin oxide (ITO) electrode and used as an electrode in an electrochromic device. Poly(3,4-ethylenedioxythiophene):poly(4-styrenesulfonate) (PEDOT:PSS) was spin-coated on ITO as the other electrode. Carboxyl-terminated- butadiene-acrylonitrile (CTBN) blended with LiClO4 was used as solid polymer electrolyte. A total solid electrochromic device was assembled as follows: ITO|P(TMSPA-co-DMA)∥LiClO4-CTBN∥PEDOT:PSS|ITO. The columbic efficiency of the devices reached to 104% for P(TMSPA-co-DMA) film with TMSPA feed ratio of 0.25. The optical contrast (ΔT, %) of the single electrode and the device were determined by UV–vis spectroelectrochemical studies. The stability of ΔT was improved during color switching from +1.5 to −1.5V (vs. PEDOT) for this device. The device was pale yellow at −1.5V and blue at +1.5V.