The thermomechanical properties of Nis~Tis~ deposited on Si substrates was studied focusing on the thermoelastic stress, martensitic transformation stress and interaction of the film and substrate. Nis,)TisJSiOffSi film composites display a two-way shape memory effect without training. The stresses giving rise to this effect are the thermoelastic stress evolving upon cooling from the temperature at which the amorphous as-deposited Ni~oTis, was crystallized and martensitic transformation stress. It is shown how the thermoelastic bending can be compensated for in a (crystalline NisoTiso)/SiOz/Si/(amorphous Nis~,Tis~j) trimorph. The experimentally determined temperature dependence of the stress outside the transformation region agrees with the calculated value of the thermoelastic stress; in the vicinity of the Ms and Af temperatures, which are equal to each other, it also agrees with the theoretical prediction based on the equilibrium thermodynamics of the sum of the film, substrate and film/substrate elastic (interaction) energies. The film/substrate interaction energy is derived from martensitic transformation characteristics through interface accommodation and mechanical constraints exerted by the substrate stiffness. This knowledge has been applied Io fabricate a two way shape memory micro composite switch.