In Internet of Things networks (IoT), accurate monitoring data delivery without interruptions is vital, especially for high-risk use cases, such as in the industrial field. Existing approaches to AI-based fault diagnosis have various disadvantages such as being computationally expensive or lacking transparency and being difficult to trust. To overcome these limitations this research introduces a novel method for IoT devices namely XAI-LCS. This technique uses the eXtreme Gradient Boosting (XGBoost) algorithm for early sensor fault detection. XAI-LCS is oriented towards detecting different types of faults including bias, drift, complete failure, and precision degradation, as well as accounting for data imbalances and avoiding biased detections. The proposed solution achieves a 98 % validation accuracy in diagnosing four sensor fault types. The XAI component which provides explanations for the AI-based model processes, enhances the trust and transparency of the developed solution. As a result, this study contributes to improving sensor application failures in IoT.