diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp index 8bc4f4c627925d..a6e94765d86cf8 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp @@ -136,8 +136,8 @@ void AirQualitySensorManager::Init() void AirQualitySensorManager::OnAirQualityChangeHandler(AirQualityEnum newValue) { - mAirQualityInstance.UpdateAirQuality(static_cast(newValue)); - ChipLogDetail(NotSpecified, "Updated AirQuality value: %huu", newValue); + mAirQualityInstance.UpdateAirQuality(newValue); + ChipLogDetail(NotSpecified, "Updated AirQuality value: %huu", chip::to_underlying(newValue)); } void AirQualitySensorManager::OnCarbonDioxideMeasurementChangeHandler(float newValue)