We expand the Potts-percolation model of a solid to include stress and strain. Neighboring atoms are connected by bonds. We set the energy of a bond to be given by the Lennard-Jones potential. If the energy is larger than a threshold the bond is more likely to fail, whereas if the energy is lower than the threshold, the bond is more likely to be alive. In two dimensions we compute the equation of state: stress as a function of interatomic distance and temperature by using renormalization-group and Monte Carlo simulations. The phase diagram, the equation of state, and the isothermal modulus are determined. When the Potts heat capacity is divergent the continuous transition is replaced by a weak first-order transition through the van der Waals loop mechanism. When the Potts transition is first order the stress exhibits a large discontinuity as a function of the interatomic distance.