Skip to content

Commit 1255658

Browse files
jepenven-silabspull[bot]
authored andcommitted
[Silabs] Add nullable value check (#25820)
1 parent ddf1891 commit 1255658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/thermostat/silabs/efr32/src/TemperatureManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CHIP_ERROR TemperatureManager::Init()
5656
ThermAttr::SystemMode::Get(kThermostatEndpoint, &systemMode);
5757
PlatformMgr().UnlockChipStack();
5858

59-
mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value());
59+
mCurrentTempCelsius = ConvertToPrintableTemp((temp.IsNull()) ? static_cast<int16_t>(0.0) : temp.Value());
6060
mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint);
6161
mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint);
6262
mThermMode = systemMode;

0 commit comments

Comments
 (0)