The paper aims to present modelling the sensor network operation based on the Potts model. The authors presented own approach based on three states in which each node can be. The change in the state of a given node depends on its current state, the impact of surrounding nodes on it, but also values of the parameters measured. Therefore, the Hamiltonian was introduced as a dependence of both exceeding the limit value of a measured parameter (corresponding to an alarm event), and the state of the battery powering a given node of a sensor. The simulations of the implemented algorithm based on the adopted model presented in the paper relate to the measurement of temperature by a network of sensors. However, this model is universal and can be applied to examine the behaviour of the sensor infrastructure performing various measurements. Moreover, it may simulate the functioning of the critical network infrastructure or sensor networks and industrial sensors supporting the functioning of Industry 4.0.