diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index a506c82..473f6bc 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -417,8 +417,8 @@
 
               uint5_t, // reserved
               bool,    // reading state
-              bool,    // sensor scanning state disabled
-              bool,    // all event message state disabled
+              bool,    // 0 = sensor scanning state disabled
+              bool,    // 0 = all event messages disabled
 
               uint8_t, // threshold levels states
               uint8_t  // discrete reading sensor states
@@ -443,32 +443,15 @@
 
     try
     {
-        ipmi::sensor::GetSensorResponse getResponse{};
-        getResponse = iter->second.getFunc(iter->second);
+        ipmi::sensor::GetSensorResponse getResponse =
+            iter->second.getFunc(iter->second);
 
-        constexpr uint8_t senReadingResp = 0;
-        constexpr uint8_t senScanStateResp = 1;
-        constexpr uint8_t assertionStatesLsbResp = 2;
-        constexpr uint8_t assertionStatesMsbResp = 3;
-        constexpr uint8_t senReadStateMask = 0x20;
-        constexpr uint8_t senScanStateMask = 0x40;
-        constexpr uint8_t allEventMessageStateMask = 0x80;
-
-        uint8_t senReading = getResponse[senReadingResp];
-        constexpr uint5_t reserved{0};
-        bool readState =
-            static_cast<bool>(getResponse[senScanStateResp] & senReadStateMask);
-        bool senScanState =
-            static_cast<bool>(getResponse[senScanStateResp] & senScanStateMask);
-        bool allEventMessageState = static_cast<bool>(
-            getResponse[senScanStateResp] & allEventMessageStateMask);
-
-        uint8_t assertionStatesLsb = getResponse[assertionStatesLsbResp];
-        uint8_t assertionStatesMsb = getResponse[assertionStatesMsbResp];
-
-        return ipmi::responseSuccess(senReading, reserved, readState,
-                                     senScanState, allEventMessageState,
-                                     assertionStatesLsb, assertionStatesMsb);
+        return ipmi::responseSuccess(getResponse.reading, uint5_t(0),
+                                     getResponse.readingOrStateUnavailable,
+                                     getResponse.scanningEnabled,
+                                     getResponse.allEventMessagesEnabled,
+                                     getResponse.thresholdLevelsStates,
+                                     getResponse.discreteReadingSensorStates);
     }
 #ifdef UPDATE_FUNCTIONAL_ON_FAIL
     catch (const SensorFunctionalError& e)
