diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 1c7a009..99c45ef 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -153,7 +153,7 @@
         res.jsonValue["PowerControl"] = nlohmann::json::array();
 
         auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::types.at(sensors::node::power),
+            res, chassisName, sensors::dbus::paths.at(sensors::node::power),
             sensors::node::power);
 
         getChassisData(sensorAsyncResp);
@@ -336,7 +336,7 @@
 
         const std::string& chassisName = params[0];
         auto asyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::types.at(sensors::node::power),
+            res, chassisName, sensors::dbus::paths.at(sensors::node::power),
             sensors::node::power);
 
         std::optional<std::vector<nlohmann::json>> voltageCollections;
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 35114bf..9f06d2f 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -54,9 +54,10 @@
 
 namespace dbus
 {
+
 static const boost::container::flat_map<std::string_view,
                                         std::vector<const char*>>
-    types = {{node::power,
+    paths = {{node::power,
               {"/xyz/openbmc_project/sensors/voltage",
                "/xyz/openbmc_project/sensors/power"}},
              {node::sensors,
@@ -67,6 +68,88 @@
               {"/xyz/openbmc_project/sensors/fan_tach",
                "/xyz/openbmc_project/sensors/temperature",
                "/xyz/openbmc_project/sensors/fan_pwm"}}};
+} // namespace dbus
+
+inline const char* toReadingType(const std::string& sensorType)
+{
+    if (sensorType == "voltage")
+    {
+        return "Voltage";
+    }
+    if (sensorType == "power")
+    {
+        return "Power";
+    }
+    if (sensorType == "current")
+    {
+        return "Current";
+    }
+    if (sensorType == "fan_tach")
+    {
+        return "Rotational";
+    }
+    if (sensorType == "temperature")
+    {
+        return "Temperature";
+    }
+    if (sensorType == "fan_pwm" || sensorType == "utilization")
+    {
+        return "Percent";
+    }
+    if (sensorType == "altitude")
+    {
+        return "Altitude";
+    }
+    if (sensorType == "airflow")
+    {
+        return "AirFlow";
+    }
+    if (sensorType == "energy")
+    {
+        return "EnergyJoules";
+    }
+    return "";
+}
+
+inline const char* toReadingUnits(const std::string& sensorType)
+{
+    if (sensorType == "voltage")
+    {
+        return "V";
+    }
+    if (sensorType == "power")
+    {
+        return "W";
+    }
+    if (sensorType == "current")
+    {
+        return "A";
+    }
+    if (sensorType == "fan_tach")
+    {
+        return "RPM";
+    }
+    if (sensorType == "temperature")
+    {
+        return "Cel";
+    }
+    if (sensorType == "fan_pwm" || sensorType == "utilization")
+    {
+        return "%";
+    }
+    if (sensorType == "altitude")
+    {
+        return "m";
+    }
+    if (sensorType == "airflow")
+    {
+        return "cft_i/min";
+    }
+    if (sensorType == "energy")
+    {
+        return "J";
+    }
+    return "";
 }
 } // namespace sensors
 
@@ -854,17 +937,27 @@
     if (sensorsAsyncResp->chassisSubNode == sensors::node::sensors)
     {
         sensorJson["@odata.type"] = "#Sensor.v1_0_0.Sensor";
-        if (sensorType == "power")
+
+        const std::string& readingType = sensors::toReadingType(sensorType);
+        if (readingType.empty())
         {
-            sensorJson["ReadingUnits"] = "Watts";
+            BMCWEB_LOG_ERROR << "Redfish cannot map reading type for "
+                             << sensorType;
         }
-        else if (sensorType == "current")
+        else
         {
-            sensorJson["ReadingUnits"] = "Amperes";
+            sensorJson["ReadingType"] = readingType;
         }
-        else if (sensorType == "utilization")
+
+        const std::string& readingUnits = sensors::toReadingUnits(sensorType);
+        if (readingUnits.empty())
         {
-            sensorJson["ReadingUnits"] = "Percent";
+            BMCWEB_LOG_ERROR << "Redfish cannot map reading unit for "
+                             << sensorType;
+        }
+        else
+        {
+            sensorJson["ReadingUnits"] = readingUnits;
         }
     }
     else if (sensorType == "temperature")
@@ -2979,8 +3072,8 @@
                                  const std::string& node,
                                  SensorsAsyncResp::DataCompleteCb&& mapComplete)
 {
-    auto typesIt = sensors::dbus::types.find(node);
-    if (typesIt == sensors::dbus::types.end())
+    auto pathIt = sensors::dbus::paths.find(node);
+    if (pathIt == sensors::dbus::paths.end())
     {
         BMCWEB_LOG_ERROR << "Wrong node provided : " << node;
         mapComplete(boost::beast::http::status::bad_request, {});
@@ -2995,7 +3088,7 @@
                 uriToDbus) { mapCompleteCb(status, uriToDbus); };
 
     auto resp = std::make_shared<SensorsAsyncResp>(
-        *respBuffer, chassis, typesIt->second, node, std::move(callback));
+        *respBuffer, chassis, pathIt->second, node, std::move(callback));
     getChassisData(resp);
 }
 
@@ -3030,7 +3123,7 @@
         const std::string& chassisId = params[0];
         std::shared_ptr<SensorsAsyncResp> asyncResp =
             std::make_shared<SensorsAsyncResp>(
-                res, chassisId, sensors::dbus::types.at(sensors::node::sensors),
+                res, chassisId, sensors::dbus::paths.at(sensors::node::sensors),
                 sensors::node::sensors);
 
         auto getChassisCb =
diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
index 8e01bee..00acdf9 100644
--- a/redfish-core/lib/thermal.hpp
+++ b/redfish-core/lib/thermal.hpp
@@ -48,7 +48,7 @@
         }
         const std::string& chassisName = params[0];
         auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::types.at(sensors::node::thermal),
+            res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
             sensors::node::thermal);
 
         // TODO Need to get Chassis Redundancy information.
@@ -71,7 +71,7 @@
             allCollections;
 
         auto asyncResp = std::make_shared<SensorsAsyncResp>(
-            res, chassisName, sensors::dbus::types.at(sensors::node::thermal),
+            res, chassisName, sensors::dbus::paths.at(sensors::node::thermal),
             sensors::node::thermal);
 
         if (!json_util::readJson(req, asyncResp->res, "Temperatures",
