Timely detection and elimination of surface condensation is crucial for diverse applications in agriculture, automotive, oil and gas industries, and respiratory monitoring. In this paper, a smart patch based on a ZnO/aluminum (~5 μm/50 μm thick) flexible Lamb wave device has been proposed to detect, prevent and eliminate condensation, which can be realized using both of its surfaces. The patch is operated using a machine learning algorithm which consists of data preprocessing (feature selection and optimization) and model training by a random forest algorithm. It has been tested in six cases, and the results show good detection performance with average Precision = 94.40% and average F1 score = 93.23%. Principle of accelerating evaporation is investigated in order to understand the elimination and prevention functions for surface condensation. Results show that both dielectric heating and acoustothermal effect have their contributions, whereas the former is found more dominant. Furthermore, the functional relationship between the evaporation rate and the input power is calibrated, showing a high linearity (R2 = 97.64%) with a slope of ~3.6×10-5 1/(s·mW). With an input power of ~0.6 W, the flexible device has been proven effective in the prevention of condensation.