diff --git a/src/FanMain.cpp b/src/FanMain.cpp
index 365fd90..121621d 100644
--- a/src/FanMain.cpp
+++ b/src/FanMain.cpp
@@ -124,9 +124,7 @@
         const char* baseType;
         const SensorData* sensorData = nullptr;
         const std::string* interfacePath = nullptr;
-        const std::pair<std::string, boost::container::flat_map<
-                                         std::string, BasicVariantType>>*
-            baseConfiguration = nullptr;
+        const SensorBaseConfiguration* baseConfiguration = nullptr;
         for (const std::pair<sdbusplus::message::object_path, SensorData>&
                  sensor : sensorConfigurations)
         {
@@ -263,10 +261,15 @@
             redundancy = systemRedundancy;
         }
 
+        constexpr double defaultMaxReading = 25000;
+        constexpr double defaultMinReading = 0;
+        auto limits = std::make_pair(defaultMinReading, defaultMaxReading);
+
+        findLimits(limits, baseConfiguration);
         tachSensors[sensorName] = std::make_unique<TachSensor>(
             path.string(), baseType, objectServer, dbusConnection,
             std::move(presenceSensor), redundancy, io, sensorName,
-            std::move(sensorThresholds), *interfacePath);
+            std::move(sensorThresholds), *interfacePath, limits);
     }
     std::vector<fs::path> pwms;
     if (!findFiles(fs::path("/sys/class/hwmon"), R"(pwm\d+)", pwms))
diff --git a/src/TachSensor.cpp b/src/TachSensor.cpp
index 63ced19..70d7d4c 100644
--- a/src/TachSensor.cpp
+++ b/src/TachSensor.cpp
@@ -31,9 +31,6 @@
 static constexpr unsigned int pwmPollMs = 500;
 static constexpr size_t warnAfterErrorCount = 10;
 
-static constexpr double maxReading = 25000;
-static constexpr double minReading = 0;
-
 TachSensor::TachSensor(const std::string &path, const std::string &objectType,
                        sdbusplus::asio::object_server &objectServer,
                        std::shared_ptr<sdbusplus::asio::connection> &conn,
@@ -41,10 +38,11 @@
                        const std::shared_ptr<RedundancySensor> &redundancy,
                        boost::asio::io_service &io, const std::string &fanName,
                        std::vector<thresholds::Threshold> &&_thresholds,
-                       const std::string &sensorConfiguration) :
+                       const std::string &sensorConfiguration,
+                       const std::pair<size_t, size_t> &limits) :
     Sensor(boost::replace_all_copy(fanName, " ", "_"), path,
-           std::move(_thresholds), sensorConfiguration, objectType, maxReading,
-           minReading),
+           std::move(_thresholds), sensorConfiguration, objectType,
+           limits.second, limits.first),
     objServer(objectServer), dbusConnection(conn),
     presence(std::move(presence)), redundancy(redundancy),
     inputDev(io, open(path.c_str(), O_RDONLY)), waitTimer(io), errCount(0)
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 15fce73..e4de9e0 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -156,3 +156,26 @@
 
     return powerStatusOn;
 }
+
+// replaces limits if MinReading and MaxReading are found.
+void findLimits(std::pair<double, double>& limits,
+                const SensorBaseConfiguration* data)
+{
+    if (!data)
+    {
+        return;
+    }
+    auto maxFind = data->second.find("MaxReading");
+    auto minFind = data->second.find("MinReading");
+
+    if (minFind != data->second.end())
+    {
+        limits.first = sdbusplus::message::variant_ns::visit(
+            VariantToDoubleVisitor(), minFind->second);
+    }
+    if (maxFind != data->second.end())
+    {
+        limits.second = sdbusplus::message::variant_ns::visit(
+            VariantToDoubleVisitor(), maxFind->second);
+    }
+}
\ No newline at end of file
