diff --git a/interface_ops.hpp b/interface_ops.hpp
index 96a2422..b16fa57 100644
--- a/interface_ops.hpp
+++ b/interface_ops.hpp
@@ -48,7 +48,7 @@
 struct MakeInterface
 {
     static std::any op(sdbusplus::bus::bus& bus, const char* path,
-                       const Interface&)
+                       const Interface&, bool)
     {
         return std::any(std::make_shared<T>(bus, path));
     }
@@ -58,7 +58,7 @@
 struct MakeInterface<T, std::enable_if_t<HasProperties<T>::value>>
 {
     static std::any op(sdbusplus::bus::bus& bus, const char* path,
-                       const Interface& props)
+                       const Interface& props, bool deferSignal)
     {
         using InterfaceVariant =
             std::map<std::string, typename T::PropertiesVariant>;
@@ -70,28 +70,29 @@
                       convertVariant<typename T::PropertiesVariant>(p.second));
         }
 
-        return std::any(std::make_shared<T>(bus, path, v));
+        return std::any(std::make_shared<T>(bus, path, v, deferSignal));
     }
 };
 
 template <typename T, typename Enable = void>
 struct AssignInterface
 {
-    static void op(const Interface&, std::any&)
+    static void op(const Interface&, std::any&, bool)
     {}
 };
 
 template <typename T>
 struct AssignInterface<T, std::enable_if_t<HasProperties<T>::value>>
 {
-    static void op(const Interface& props, std::any& holder)
+    static void op(const Interface& props, std::any& holder, bool deferSignal)
     {
         auto& iface = *std::any_cast<std::shared_ptr<T>&>(holder);
         for (const auto& p : props)
         {
             iface.setPropertyByName(
                 p.first,
-                convertVariant<typename T::PropertiesVariant>(p.second));
+                convertVariant<typename T::PropertiesVariant>(p.second),
+                deferSignal);
         }
     }
 };
diff --git a/manager.cpp b/manager.cpp
index 20cdb05..0aa2176 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -166,16 +166,16 @@
                 // Add the new interface.
                 auto& ctor = std::get<MakeInterfaceType>(opsit->second);
                 refaceit = refaces.insert(
-                    refaceit,
-                    std::make_pair(ifaceit->first, ctor(_bus, path.str.c_str(),
-                                                        ifaceit->second)));
+                    refaceit, std::make_pair(ifaceit->first,
+                                             ctor(_bus, path.str.c_str(),
+                                                  ifaceit->second, false)));
                 signals.push_back(ifaceit->first);
             }
             else
             {
                 // Set the new property values.
                 auto& assign = std::get<AssignInterfaceType>(opsit->second);
-                assign(ifaceit->second, refaceit->second);
+                assign(ifaceit->second, refaceit->second, false);
             }
             if (!restoreFromCache)
             {
diff --git a/test/interface_ops_test.cpp b/test/interface_ops_test.cpp
index 68c5e95..a308a55 100644
--- a/test/interface_ops_test.cpp
+++ b/test/interface_ops_test.cpp
@@ -33,10 +33,10 @@
     MockInterface& operator=(MockInterface&&) = delete;
 
     // We'll be getting calls proxyed through other objects.
-    MOCK_METHOD2(constructWithProperties,
-                 void(const char*, const InterfaceVariant& i));
+    MOCK_METHOD3(constructWithProperties,
+                 void(const char*, const InterfaceVariant& i, bool));
     MOCK_METHOD1(constructWithoutProperties, void(const char*));
-    MOCK_METHOD2(setPropertyByName, void(std::string, FakeVariantType));
+    MOCK_METHOD3(setPropertyByName, void(std::string, FakeVariantType, bool));
 
     MOCK_METHOD2(serializeTwoArgs,
                  void(const std::string&, const std::string&));
@@ -63,14 +63,15 @@
     using PropertiesVariant = FakeVariantType;
 
     DummyInterfaceWithProperties(sdbusplus::bus::bus&, const char* name,
-                                 const InterfaceVariant& i)
+                                 const InterfaceVariant& i, bool skipSignal)
     {
-        g_currentMock->constructWithProperties(name, i);
+        g_currentMock->constructWithProperties(name, i, skipSignal);
     }
 
-    void setPropertyByName(std::string name, PropertiesVariant val)
+    void setPropertyByName(std::string name, PropertiesVariant val,
+                           bool skipSignal)
     {
-        g_currentMock->setPropertyByName(name, val);
+        g_currentMock->setPropertyByName(name, val, skipSignal);
     }
 };
 
@@ -116,10 +117,11 @@
     sdbusplus::SdBusMock interface;
 
     EXPECT_CALL(mock, constructWithoutProperties("foo")).Times(1);
-    EXPECT_CALL(mock, constructWithProperties(_, _)).Times(0);
+    EXPECT_CALL(mock, constructWithProperties(_, _, _)).Times(0);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_NO_THROW(
         std::any_cast<std::shared_ptr<DummyInterfaceWithoutProperties>>(r));
@@ -132,10 +134,11 @@
     sdbusplus::SdBusMock interface;
 
     EXPECT_CALL(mock, constructWithoutProperties("foo")).Times(1);
-    EXPECT_CALL(mock, constructWithProperties(_, _)).Times(0);
+    EXPECT_CALL(mock, constructWithProperties(_, _, _)).Times(0);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_NO_THROW(
         std::any_cast<std::shared_ptr<DummyInterfaceWithoutProperties>>(r));
@@ -148,10 +151,11 @@
     sdbusplus::SdBusMock interface;
 
     EXPECT_CALL(mock, constructWithoutProperties(_)).Times(0);
-    EXPECT_CALL(mock, constructWithProperties("bar", _)).Times(1);
+    EXPECT_CALL(mock, constructWithProperties("bar", _, _)).Times(1);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "bar", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "bar", i, false);
 
     EXPECT_NO_THROW(
         std::any_cast<std::shared_ptr<DummyInterfaceWithProperties>>(r));
@@ -164,10 +168,11 @@
     sdbusplus::SdBusMock interface;
 
     EXPECT_CALL(mock, constructWithoutProperties(_)).Times(0);
-    EXPECT_CALL(mock, constructWithProperties("foo", _)).Times(1);
+    EXPECT_CALL(mock, constructWithProperties("foo", _, _)).Times(1);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
     EXPECT_NO_THROW(
         std::any_cast<std::shared_ptr<DummyInterfaceWithProperties>>(r));
@@ -179,12 +184,13 @@
     Interface i;
     sdbusplus::SdBusMock interface;
 
-    EXPECT_CALL(mock, setPropertyByName(_, _)).Times(0);
+    EXPECT_CALL(mock, setPropertyByName(_, _, _)).Times(0);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
-    AssignInterface<DummyInterfaceWithoutProperties>::op(i, r);
+    AssignInterface<DummyInterfaceWithoutProperties>::op(i, r, false);
 }
 
 TEST(InterfaceOpsTest, TestAssignPropertylessInterfaceWithOneArgument)
@@ -193,12 +199,13 @@
     Interface i{{"foo"s, static_cast<int64_t>(1ll)}};
     sdbusplus::SdBusMock interface;
 
-    EXPECT_CALL(mock, setPropertyByName(_, _)).Times(0);
+    EXPECT_CALL(mock, setPropertyByName(_, _, _)).Times(0);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
-    AssignInterface<DummyInterfaceWithoutProperties>::op(i, r);
+    AssignInterface<DummyInterfaceWithoutProperties>::op(i, r, false);
 }
 
 TEST(InterfaceOpsTest, TestAssignInterfaceWithoutArguments)
@@ -207,12 +214,13 @@
     Interface i;
     sdbusplus::SdBusMock interface;
 
-    EXPECT_CALL(mock, setPropertyByName(_, _)).Times(0);
+    EXPECT_CALL(mock, setPropertyByName(_, _, _)).Times(0);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
-    AssignInterface<DummyInterfaceWithProperties>::op(i, r);
+    AssignInterface<DummyInterfaceWithProperties>::op(i, r, false);
 }
 
 TEST(InterfaceOpsTest, TestAssignInterfaceWithOneArgument)
@@ -221,12 +229,13 @@
     Interface i{{"foo"s, static_cast<int64_t>(1ll)}};
     sdbusplus::SdBusMock interface;
 
-    EXPECT_CALL(mock, setPropertyByName("foo"s, 1ll)).Times(1);
+    EXPECT_CALL(mock, setPropertyByName("foo"s, 1ll, _)).Times(1);
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "bar", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "bar", i, false);
 
-    AssignInterface<DummyInterfaceWithProperties>::op(i, r);
+    AssignInterface<DummyInterfaceWithProperties>::op(i, r, false);
 }
 
 TEST(InterfaceOpsTest, TestSerializePropertylessInterfaceWithoutArguments)
@@ -236,7 +245,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, serializeTwoArgs("/foo"s, "bar"s)).Times(1);
 
@@ -251,7 +261,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, serializeTwoArgs("/foo"s, "bar"s)).Times(1);
 
@@ -266,7 +277,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, serializeThreeArgs("/foo"s, "bar"s, _)).Times(1);
 
@@ -281,7 +293,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, serializeThreeArgs("/foo"s, "bar"s, _)).Times(1);
 
@@ -296,7 +309,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, deserializeNoop()).Times(1);
 
@@ -311,7 +325,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithoutProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, deserializeNoop()).Times(1);
 
@@ -326,7 +341,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, deserializeThreeArgs("/foo"s, "bar"s, _)).Times(1);
 
@@ -341,7 +357,8 @@
     sdbusplus::SdBusMock interface;
 
     auto b = sdbusplus::get_mocked_new(&interface);
-    auto r = MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i);
+    auto r =
+        MakeInterface<DummyInterfaceWithProperties>::op(b, "foo", i, false);
 
     EXPECT_CALL(mock, deserializeThreeArgs("/foo"s, "bar"s, _)).Times(1);
 
