Pass discrete type/ID values into addThreshold

The ID has to be looked up separately in some cases
so can't always be the ID specified in the key_type object.

Change-Id: I7f5b395ec3db2182fe84df24047bfae64fcee479
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/mainloop.cpp b/mainloop.cpp
index 3205ad8..1190d85 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -342,8 +342,8 @@
 #endif
         }
         auto sensorValue = valueInterface->value();
-        addThreshold<WarningObject>(i.first, sensorValue, info);
-        addThreshold<CriticalObject>(i.first, sensorValue, info);
+        addThreshold<WarningObject>(i.first.first, id, sensorValue, info);
+        addThreshold<CriticalObject>(i.first.first, id, sensorValue, info);
 
         auto target = addTarget<hwmon::FanSpeed>(
                 i.first, ioAccess.path(), _devPath, info);