diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index 408f832..3dfaaa5 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -167,6 +167,10 @@
     {
         // reset the timer and then return
         timer.restart(std::chrono::seconds(LAMP_TEST_TIMEOUT_IN_SECS));
+
+        // Notify host to reset the timer
+        doHostLampTest(true);
+
         return;
     }
 
@@ -190,7 +194,7 @@
     timer.restart(std::chrono::seconds(LAMP_TEST_TIMEOUT_IN_SECS));
     isLampTestRunning = true;
 
-    // Notify PHYP to start the lamp test
+    // Notify host to start the lamp test
     doHostLampTest(true);
 
     // Set all the Physical action to On for lamp test
@@ -222,7 +226,7 @@
     groupObj->asserted(false);
 }
 
-void LampTest::requestHandler(Group* group, bool value)
+bool LampTest::requestHandler(Group* group, bool value)
 {
     if (groupObj == NULL)
     {
@@ -232,10 +236,30 @@
     if (value)
     {
         start();
+
+        // Return true in both cases (F -> T && T -> T)
+        return true;
     }
     else
     {
-        stop();
+        if (timer.hasExpired())
+        {
+            stop();
+
+            // Return true as the request to stop the lamptest is handled
+            // successfully.
+            return true;
+        }
+        else if (timer.isEnabled())
+        {
+            lg2::info(
+                "Lamp test is still running. Cannot force stop the lamp test. Asserted is set back to true.");
+
+            // Return false as the request to stop lamptest is not handled as
+            // the lamptest is still running.
+            return false;
+        }
+        return false;
     }
 }
 
@@ -304,6 +328,5 @@
     }
     return;
 }
-
 } // namespace led
 } // namespace phosphor
diff --git a/manager/lamptest/lamptest.hpp b/manager/lamptest/lamptest.hpp
index 30d6eb2..0de9082 100644
--- a/manager/lamptest/lamptest.hpp
+++ b/manager/lamptest/lamptest.hpp
@@ -48,12 +48,18 @@
 
     /** @brief the lamp test request handler
      *
+     * If lamp test is running (Asserted=true) and if user requests to stop lamp
+     * test (Asserted input=false), Stop operation will not take place and set
+     * the Asserted to true itself. LampTest Asserted is/can be set to false
+     * only when the lamptest timer expires.
+     *
      *  @param[in]  group    -  Pointer to Group object
      *  @param[in]  value    -  true: start lamptest
      *                          false: stop lamptest
-     *  @return
+     *
+     *  @return Whether lamp test request is handled successfully or not.
      */
-    void requestHandler(Group* group, bool value);
+    bool requestHandler(Group* group, bool value);
 
     /** @brief Update physical LEDs states during lamp test and the lamp test is
      *         running
@@ -125,7 +131,7 @@
      */
     Layout::Action getActionFromString(const std::string& str);
 
-    /** @brief Notify PHYP to start / stop the lamp test
+    /** @brief Notify host to start / stop the lamp test
      *
      *  @param[in]  value   -  the Asserted property value
      */
