diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
index f5c88ea6f..961126c0d 100644
--- a/src/ipa/simple/algorithms/awb.cpp
+++ b/src/ipa/simple/algorithms/awb.cpp
@@ -96,11 +96,11 @@ void Awb::process(IPAContext &context,
 
 	RGB<double> rgbGains{ { 1 / gains.r(), 1 / gains.g(), 1 / gains.b() } };
 	context.activeState.awb.temperatureK = estimateCCT(rgbGains);
-	metadata.set(controls::ColourTemperature, context.activeState.awb.temperatureK);
+	metadata.set(controls::ColourTemperature, context.activeState.awb.temperatureK.value_or(0));
 
 	LOG(IPASoftAwb, Debug)
 		<< "gain R/B: " << gains << "; temperature: "
-		<< context.activeState.awb.temperatureK;
+		<< context.activeState.awb.temperatureK.value_or(0);
 }
 
 REGISTER_IPA_ALGORITHM(Awb, "Awb")
diff --git a/src/ipa/simple/algorithms/awb.h b/src/ipa/simple/algorithms/awb.h
index ad993f39c..df46baee4 100644
--- a/src/ipa/simple/algorithms/awb.h
+++ b/src/ipa/simple/algorithms/awb.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
- * Copyright (C) 2024-2025 Red Hat Inc.
+ * Copyright (C) 2024-2026 Red Hat Inc.
  *
  * Auto white balance
  */
@@ -13,6 +13,8 @@ namespace libcamera {
 
 namespace ipa::soft::algorithms {
 
+constexpr unsigned int kDefaultTemperature = 6500;
+
 class Awb : public Algorithm
 {
 public:
diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp
index 911a5af2c..6bac45006 100644
--- a/src/ipa/simple/algorithms/ccm.cpp
+++ b/src/ipa/simple/algorithms/ccm.cpp
@@ -15,6 +15,8 @@
 
 #include "libcamera/internal/matrix.h"
 
+#include "awb.h"
+
 namespace {
 
 constexpr unsigned int kTemperatureThreshold = 100;
@@ -44,7 +46,8 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData
 void Ccm::prepare(IPAContext &context, [[maybe_unused]] const uint32_t frame,
 		  IPAFrameContext &frameContext, [[maybe_unused]] DebayerParams *params)
 {
-	const unsigned int ct = context.activeState.awb.temperatureK;
+	const unsigned int ct =
+		context.activeState.awb.temperatureK.value_or(kDefaultTemperature);
 
 	/* Change CCM only on bigger temperature changes. */
 	if (!currentCcm_ ||
diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
index 34f7403a4..c4bd91bb0 100644
--- a/src/ipa/simple/ipa_context.h
+++ b/src/ipa/simple/ipa_context.h
@@ -50,7 +50,7 @@ struct IPAActiveState {
 
 	struct {
 		RGB<float> gains;
-		unsigned int temperatureK;
+		std::optional<unsigned int> temperatureK;
 	} awb;
 
 	Matrix<float, 3, 3> combinedMatrix;
