diff --git a/src/trigger.cpp b/src/trigger.cpp
index ca6804c..0b94711 100644
--- a/src/trigger.cpp
+++ b/src/trigger.cpp
@@ -85,6 +85,61 @@
         });
 
         dbusIface.register_property_rw(
+            "DiscreteThresholds", std::vector<discrete::ThresholdParam>{},
+            sdbusplus::vtable::property_::emits_change,
+            [this, &triggerFactory](
+                const std::vector<discrete::ThresholdParam>& newVal,
+                std::vector<discrete::ThresholdParam>& oldVal) {
+            LabeledTriggerThresholdParams newThresholdParams =
+                utils::ToLabeledThresholdParamConversion()(newVal);
+            TriggerManager::verifyThresholdParams(newThresholdParams);
+            triggerFactory.updateThresholds(thresholds, *id, triggerActions,
+                                            reportIds, sensors,
+                                            newThresholdParams);
+            oldVal = std::move(newVal);
+            return 1;
+        },
+            [this](const auto&) {
+            TriggerThresholdParams unlabeled =
+                fromLabeledThresholdParam(getLabeledThresholds());
+            auto* ptr =
+                std::get_if<std::vector<discrete::ThresholdParam>>(&unlabeled);
+            if (ptr == nullptr)
+            {
+                // If internal type doesn't match, return empty set
+                return std::vector<discrete::ThresholdParam>{};
+            }
+            return *ptr;
+        });
+
+        dbusIface.register_property_rw(
+            "NumericThresholds", std::vector<numeric::ThresholdParam>{},
+            sdbusplus::vtable::property_::emits_change,
+            [this, &triggerFactory](
+                const std::vector<numeric::ThresholdParam>& newVal,
+                std::vector<numeric::ThresholdParam>& oldVal) {
+            LabeledTriggerThresholdParams newThresholdParams =
+                utils::ToLabeledThresholdParamConversion()(newVal);
+            TriggerManager::verifyThresholdParams(newThresholdParams);
+            triggerFactory.updateThresholds(thresholds, *id, triggerActions,
+                                            reportIds, sensors,
+                                            newThresholdParams);
+            oldVal = std::move(newVal);
+            return 1;
+        },
+            [this](const auto&) {
+            TriggerThresholdParams unlabeled =
+                fromLabeledThresholdParam(getLabeledThresholds());
+            auto* ptr =
+                std::get_if<std::vector<numeric::ThresholdParam>>(&unlabeled);
+            if (ptr == nullptr)
+            {
+                // If internal type doesn't match, return empty set
+                return std::vector<numeric::ThresholdParam>{};
+            }
+            return *ptr;
+        });
+        dbusIface.register_property_rw(
             "Sensors", SensorsInfo{},
             sdbusplus::vtable::property_::emits_change,
             [this, &triggerFactory](auto newVal, auto& oldVal) {
diff --git a/src/trigger_manager.cpp b/src/trigger_manager.cpp
index 20dee51..5cc824e 100644
--- a/src/trigger_manager.cpp
+++ b/src/trigger_manager.cpp
@@ -25,16 +25,28 @@
         triggerManagerPath, triggerManagerIfaceName, [this](auto& iface) {
         iface.register_method(
             "AddTrigger",
-            [this](boost::asio::yield_context& yield, const std::string& id,
-                   const std::string& name,
-                   const std::vector<std::string>& triggerActions,
-                   const SensorsInfo& sensors,
-                   const std::vector<sdbusplus::message::object_path>& reports,
-                   const TriggerThresholdParamsExt& thresholds) {
-            LabeledTriggerThresholdParams labeledTriggerThresholdParams =
-                std::visit(utils::ToLabeledThresholdParamConversion(),
-                           thresholds);
-
+            [this](
+                boost::asio::yield_context& yield, const std::string& id,
+                const std::string& name,
+                const std::vector<std::string>& triggerActions,
+                const SensorsInfo& sensors,
+                const std::vector<sdbusplus::message::object_path>& reports,
+                const std::vector<numeric::ThresholdParam>& numericThresholds,
+                const std::vector<discrete::ThresholdParam>&
+                    discreteThresholds) {
+            LabeledTriggerThresholdParams labeledTriggerThresholdParams;
+            if (!numericThresholds.empty())
+            {
+                labeledTriggerThresholdParams =
+                    utils::ToLabeledThresholdParamConversion()(
+                        numericThresholds);
+            }
+            if (!discreteThresholds.empty())
+            {
+                labeledTriggerThresholdParams =
+                    utils::ToLabeledThresholdParamConversion()(
+                        discreteThresholds);
+            }
             std::vector<LabeledSensorInfo> labeledSensorsInfo =
                 triggerFactory->getLabeledSensorsInfo(yield, sensors);
 
diff --git a/src/types/trigger_types.hpp b/src/types/trigger_types.hpp
index 38da4f8..2c53a8b 100644
--- a/src/types/trigger_types.hpp
+++ b/src/types/trigger_types.hpp
@@ -136,12 +136,9 @@
                         utils::tstring::ThresholdValue>;
 } // namespace numeric
 
-using TriggerThresholdParamsExt =
-    std::variant<std::monostate, std::vector<numeric::ThresholdParam>,
-                 std::vector<discrete::ThresholdParam>>;
-
 using TriggerThresholdParams =
-    utils::WithoutMonostate<TriggerThresholdParamsExt>;
+    std::variant<std::vector<numeric::ThresholdParam>,
+                 std::vector<discrete::ThresholdParam>>;
 
 using LabeledTriggerThresholdParams =
     std::variant<std::vector<numeric::LabeledThresholdParam>,
diff --git a/tests/src/params/trigger_params.hpp b/tests/src/params/trigger_params.hpp
index b39941c..ae97732 100644
--- a/tests/src/params/trigger_params.hpp
+++ b/tests/src/params/trigger_params.hpp
@@ -99,6 +99,28 @@
         return labeledThresholdsProperty;
     }
 
+    const std::vector<numeric::LabeledThresholdParam>
+        numericThresholdParams() const
+    {
+        const auto* num = std::get_if<0>(&labeledThresholdsProperty);
+        if (num == nullptr)
+        {
+            return {};
+        }
+        return *num;
+    }
+
+    const std::vector<discrete::LabeledThresholdParam>
+        discreteThresholdParams() const
+    {
+        const auto* num = std::get_if<1>(&labeledThresholdsProperty);
+        if (num == nullptr)
+        {
+            return {};
+        }
+        return *num;
+    }
+
   private:
     std::string idProperty = "Trigger1";
     std::string nameProperty = "My Numeric Trigger";
diff --git a/tests/src/test_trigger.cpp b/tests/src/test_trigger.cpp
index 9c68d94..98162ca 100644
--- a/tests/src/test_trigger.cpp
+++ b/tests/src/test_trigger.cpp
@@ -165,10 +165,16 @@
     EXPECT_THAT(
         getProperty<bool>(sut->getPath(), "Discrete"),
         Eq(isTriggerThresholdDiscrete(triggerParams.thresholdParams())));
-    EXPECT_THAT(
-        getProperty<TriggerThresholdParams>(sut->getPath(), "Thresholds"),
-        Eq(std::visit(utils::FromLabeledThresholdParamConversion(),
-                      triggerParams.thresholdParams())));
+
+    EXPECT_THAT(getProperty<std::vector<numeric::ThresholdParam>>(
+                    sut->getPath(), "NumericThresholds"),
+                Eq(std::get<0>(utils::FromLabeledThresholdParamConversion()(
+                    triggerParams.numericThresholdParams()))));
+
+    EXPECT_THAT(getProperty<std::vector<discrete::ThresholdParam>>(
+                    sut->getPath(), "DiscreteThresholds"),
+                Eq(std::get<1>(utils::FromLabeledThresholdParamConversion()(
+                    triggerParams.discreteThresholdParams()))));
 }
 
 TEST_F(TestTrigger, checkBasicGetters)
diff --git a/tests/src/test_trigger_manager.cpp b/tests/src/test_trigger_manager.cpp
index a7651ef..3204b19 100644
--- a/tests/src/test_trigger_manager.cpp
+++ b/tests/src/test_trigger_manager.cpp
@@ -24,6 +24,14 @@
     {
         const auto sensorInfos =
             utils::fromLabeledSensorsInfo(params.sensors());
+        const std::vector<numeric::LabeledThresholdParam> numThresh =
+            params.numericThresholdParams();
+        const std::vector<discrete::LabeledThresholdParam> discThresh =
+            params.discreteThresholdParams();
+        const std::vector<numeric::ThresholdParam> numThresh2 = std::get<0>(
+            utils::FromLabeledThresholdParamConversion()(numThresh));
+        const auto discThresh2 = std::get<1>(
+            utils::FromLabeledThresholdParamConversion()(discThresh));
 
         std::promise<std::pair<boost::system::error_code, std::string>>
             addTriggerPromise;
@@ -38,9 +46,7 @@
             utils::transform(
                 params.triggerActions(),
                 [](const auto& action) { return actionToString(action); }),
-            sensorInfos, params.reports(),
-            std::visit(utils::FromLabeledThresholdParamConversion(),
-                       params.thresholdParams()));
+            sensorInfos, params.reports(), numThresh2, discThresh2);
         return DbusEnvironment::waitForFuture(addTriggerPromise.get_future());
     }
 
