diff --git a/occ_sensor.mako.hpp b/occ_sensor.mako.hpp
index b5fac53..19c785f 100755
--- a/occ_sensor.mako.hpp
+++ b/occ_sensor.mako.hpp
@@ -6,6 +6,8 @@
 #pragma once
 
 #include <map>
+#include <string>
+#include <tuple>
 
 namespace open_power
 {
@@ -14,15 +16,18 @@
 
 using instanceID = int;
 using sensorID = uint8_t;
-const std::map<instanceID, sensorID> Status::sensorMap = {
+using sensorName = std::string;
+using sensorDefs = std::tuple<sensorID, sensorName>;
+const std::map<instanceID, sensorDefs> Status::sensorMap = {
 \
 % for occ in occDict:
 <%
     instance = occ.get("Instance")
     id = occ.get("SensorID")
+    name = occ.get("SensorName")
 %>\
 \
-    { ${instance}, ${id} },\
+    { ${instance}, { ${id}, "${name}" }},\
 
 % endfor
 };
diff --git a/occ_status.cpp b/occ_status.cpp
index c2c4bae..0782f87 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -95,7 +95,8 @@
     method.append(convertForMessage(Control::Host::Command::OCCReset).c_str());
 
     // OCC Sensor ID for callout reasons
-    method.append(sdbusplus::message::variant<uint8_t>(sensorMap.at(instance)));
+    method.append(sdbusplus::message::variant<uint8_t>(
+        std::get<0>(sensorMap.at(instance))));
     bus.call_noreply(method);
     return;
 }
@@ -122,9 +123,9 @@
             Control::Host::Command::OCCReset)
         {
             // Must be a Timeout. Log an Error trace
-            log<level::ERR>("Error resetting the OCC.",
-                            entry("PATH=%s", path.c_str()),
-                            entry("SENSORID=0x%X", sensorMap.at(instance)));
+            log<level::ERR>(
+                "Error resetting the OCC.", entry("PATH=%s", path.c_str()),
+                entry("SENSORID=0x%X", std::get<0>(sensorMap.at(instance))));
         }
     }
     return;
diff --git a/occ_status.hpp b/occ_status.hpp
index 859b5b0..1617d12 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -31,6 +31,12 @@
 // IPMI sensor ID for a given OCC instance
 using sensorID = uint8_t;
 
+// Human readable sensor name for DBus tree. E.g. "CPU0_OCC"
+using sensorName = std::string;
+
+// OCC sensors definitions in the map
+using sensorDefs = std::tuple<sensorID, sensorName>;
+
 // OCC sysfs name prefix
 const std::string sysfsName = "occ-hwmon";
 
@@ -60,9 +66,8 @@
     Status(sdbusplus::bus::bus& bus, EventPtr& event, const char* path,
            const Manager& manager,
            std::function<void(bool)> callBack = nullptr) :
-        Interface(bus, path, true),
-        bus(bus), path(path), callBack(callBack),
-        instance(((this->path.back() - '0'))),
+        Interface(bus, getDbusPath(path).c_str(), true),
+        bus(bus), path(path), callBack(callBack), instance(getInstance(path)),
         device(event,
 #ifdef I2C_OCC
                fs::path(DEV_PATH) / i2c_occ::getI2cDeviceName(path),
@@ -140,8 +145,8 @@
     /** @brief OCC instance number. Ex, 0,1, etc */
     int instance;
 
-    /** @brief OCC instance to Sensor ID mapping */
-    static const std::map<instanceID, sensorID> sensorMap;
+    /** @brief OCC instance to Sensor definitions mapping */
+    static const std::map<instanceID, sensorDefs> sensorMap;
 
     /** @brief OCC device object to do bind and unbind */
     Device device;
@@ -169,6 +174,39 @@
     /** @brief Sends a message to host control command handler to reset OCC
      */
     void resetOCC();
+
+    /** @brief Determines the instance ID by specified object path.
+     *  @param[in]  path  Estimated OCC Dbus object path
+     *  @return  Instance number
+     */
+    static int getInstance(const std::string& path)
+    {
+        return (path.empty() ? 0 : path.back() - '0');
+    }
+
+    /** @brief Override the sensor name with name from the definition.
+     *  @param[in]  estimatedPath - Estimated OCC Dbus object path
+     *  @return  Fixed OCC DBus object path
+     */
+    static std::string getDbusPath(const std::string& estimatedPath)
+    {
+        if (!estimatedPath.empty())
+        {
+            auto it = sensorMap.find(getInstance(estimatedPath));
+            if (sensorMap.end() != it)
+            {
+                auto& name = std::get<1>(it->second);
+                if (!name.empty() && name != "None")
+                {
+                    auto path = fs::path(estimatedPath);
+                    path.replace_filename(name);
+                    return path.string();
+                }
+            }
+        }
+
+        return estimatedPath;
+    }
 };
 
 } // namespace occ
