Dinuclear ytterbium and erbium based bifunction complexes Ln2L2(depma2)Cl2 (1-Ln, Ln = Yb and Er, H2L = N1,N3-bis(salicylideneimino)diethylenetriamine, depma2 = dimerized 9-diethyl-phosphonomethylanthracene) are reported. They undergo thermo-induced consecutive phase transitions, first the dissociation of depma2 ligand forming LnL(depma)Cl (2-Ln) and then the release of chloroethane forming LnL(epma) (3-Ln, epma = 9-ethylphosphonomethylanthrancene). The structural transformations are accompanied with synergetic switch of the luminescence in visible and NIR regions and also magnetic dynamics.