Skip to content

Commit

Permalink
[Silabs] Add nullable value check (#25820)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Nov 2, 2023
1 parent 78117d8 commit 917d1d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CHIP_ERROR TemperatureManager::Init()
ThermAttr::SystemMode::Get(kThermostatEndpoint, &systemMode);
PlatformMgr().UnlockChipStack();

mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value());
mCurrentTempCelsius = ConvertToPrintableTemp((temp.IsNull()) ? static_cast<int16_t>(0.0) : temp.Value());
mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint);
mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint);
mThermMode = systemMode;
Expand Down

0 comments on commit 917d1d0

Please sign in to comment.