diff --git a/control/manager.cpp b/control/manager.cpp
index d5f97d7..a322c10 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -21,6 +21,7 @@
 #include <unistd.h>
 #include "manager.hpp"
 #include "utility.hpp"
+#include "sdbusplus.hpp"
 
 namespace phosphor
 {
@@ -36,50 +37,6 @@
 constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
 constexpr auto FAN_CONTROL_READY_TARGET = "obmc-fan-control-ready@0.target";
 
-constexpr auto PROPERTY_INTERFACE = "org.freedesktop.DBus.Properties";
-constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
-constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
-constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper";
-
-
-/**
- * Get the current value of the D-Bus property under the specified path
- * and interface.
- *
- * @param[in] bus          - The D-Bus bus object
- * @param[in] path         - The D-Bus path
- * @param[in] interface    - The D-Bus interface
- * @param[in] propertyName - The D-Bus property
- * @param[out] value       - The D-Bus property's value
- */
-template <typename T>
-void getProperty(sdbusplus::bus::bus& bus,
-                 const std::string& path,
-                 const std::string& interface,
-                 const std::string& propertyName,
-                 T& value)
-{
-    sdbusplus::message::variant<T> property;
-    std::string service = phosphor::fan::util::getService(path, interface, bus);
-
-    auto method = bus.new_method_call(service.c_str(),
-                                      path.c_str(),
-                                      PROPERTY_INTERFACE,
-                                      "Get");
-
-    method.append(interface, propertyName);
-    auto reply = bus.call(method);
-
-    if (reply.is_method_error())
-    {
-        log<level::ERR>("Error in call response for retrieving property");
-        elog<InternalFailure>();
-    }
-    reply.read(property);
-    value = sdbusplus::message::variant_ns::get<T>(property);
-}
-
-
 /**
  * Check if a condition is true. Conditions are used to determine
  * which fan zone to use.
@@ -95,17 +52,16 @@
 
     for (auto& p : properties)
     {
-        bool value = std::get<propertyValuePos>(p);
-        bool propertyValue;
+        auto value = std::get<propertyValuePos>(p);
 
         // TODO openbmc/openbmc#1769: Support more types than just getProperty.
         if (type.compare("getProperty") == 0)
         {
-            getProperty(bus,
-                        std::get<propertyPathPos>(p),
-                        std::get<propertyInterfacePos>(p),
-                        std::get<propertyNamePos>(p),
-                        propertyValue);
+            auto propertyValue = util::SDBusPlus::getProperty<decltype(value)>(
+                    bus,
+                    std::get<propertyPathPos>(p),
+                    std::get<propertyInterfacePos>(p),
+                    std::get<propertyNamePos>(p));
 
             if (value != propertyValue)
             {
