host-bmc: Fix D-Bus property signal of sendStateSensorEvent method

When using the propertiesChanged method to monitor the D-Bus property
signal change, we have to verify the property name first, otherwise,
it may also trigger this method and send an event message to Host
when we set other property values under the same interface.
This is wrong logic.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibde7dd81c936b056413240a5f32daca7b4385957
diff --git a/host-bmc/dbus_to_event_handler.cpp b/host-bmc/dbus_to_event_handler.cpp
index 69faa1a..24c7648 100644
--- a/host-bmc/dbus_to_event_handler.cpp
+++ b/host-bmc/dbus_to_event_handler.cpp
@@ -108,14 +108,18 @@
             pldm::utils::DBusHandler::getBus(),
             propertiesChanged(dbusMapping.objectPath.c_str(),
                               dbusMapping.interface.c_str()),
-            [this, sensorEventDataVec, dbusValueMapping](auto& msg) mutable {
+            [this, sensorEventDataVec, dbusValueMapping,
+             dbusMapping](auto& msg) mutable {
                 DbusChangedProps props{};
                 std::string intf;
                 msg.read(intf, props);
-                const auto& first = props.begin();
+                if (!props.contains(dbusMapping.propertyName))
+                {
+                    return;
+                }
                 for (const auto& itr : dbusValueMapping)
                 {
-                    if (itr.second == first->second)
+                    if (itr.second == props.at(dbusMapping.propertyName))
                     {
                         auto eventData =
                             reinterpret_cast<struct pldm_sensor_event_data*>(