From 0816581b4a742e833c33ab022d20d0169433b6db Mon Sep 17 00:00:00 2001 From: Dane Evans Date: Thu, 9 Jul 2026 00:55:04 +1000 Subject: [PATCH] Promote CO2 temperatures to summary if no other temp is present. (#6153) --- .../org/meshtastic/core/ui/component/NodeItem.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItem.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItem.kt index cd1815fcd..a23dc0e13 100644 --- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItem.kt +++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeItem.kt @@ -354,6 +354,7 @@ private fun NodeSignalRow(thatNode: Node, isThisNode: Boolean, contentColor: Col private fun gatherSensors(node: Node, tempInFahrenheit: Boolean, contentColor: Color): List<@Composable () -> Unit> { val items = mutableListOf<@Composable () -> Unit>() val env = node.environmentMetrics + val aq = node.airQualityMetrics val pax = node.paxcounter if (pax.ble != 0 || pax.wifi != 0) { @@ -363,12 +364,21 @@ private fun gatherSensors(node: Node, tempInFahrenheit: Boolean, contentColor: C if ((env.temperature ?: 0f) != 0f) { val temp = MetricFormatter.temperature(env.temperature ?: 0f, tempInFahrenheit) items.add { TemperatureInfo(temp = temp, contentColor = contentColor) } + } else if ((aq.co2_temperature ?: 0f) != 0f) { + val temp = MetricFormatter.temperature(aq.co2_temperature ?: 0f, tempInFahrenheit) + items.add { TemperatureInfo(temp = temp, contentColor = contentColor) } } + if ((env.relative_humidity ?: 0f) != 0f) { items.add { HumidityInfo(humidity = MetricFormatter.humidity(env.relative_humidity ?: 0f), contentColor = contentColor) } + } else if ((aq.co2_humidity ?: 0f) != 0f) { + items.add { + HumidityInfo(humidity = MetricFormatter.humidity(aq.co2_humidity ?: 0f), contentColor = contentColor) + } } + if ((env.barometric_pressure ?: 0f) != 0f) { items.add { PressureInfo(