Add support for sensorName field in yaml

We want to have ability to specify the human readable names for the OCC
sensors. E.g. `CPU0_OCC` instead of `occ_4_0050`.

This commit allows to specify a `sensorName` field in the YAML config
for each sensor, and this name will be used in the sensor object DBus
path. If the field is not specified, previous behavior will be used.

Tested: the command `busctl tree org.open_power.OCC.Control --list` must
show specified names.

Change-Id: I2f05f7bf44120554ea07b9ee0aac9cfbd33ac376
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
diff --git a/occ_status.cpp b/occ_status.cpp
index c2c4bae..0782f87 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -95,7 +95,8 @@
     method.append(convertForMessage(Control::Host::Command::OCCReset).c_str());
 
     // OCC Sensor ID for callout reasons
-    method.append(sdbusplus::message::variant<uint8_t>(sensorMap.at(instance)));
+    method.append(sdbusplus::message::variant<uint8_t>(
+        std::get<0>(sensorMap.at(instance))));
     bus.call_noreply(method);
     return;
 }
@@ -122,9 +123,9 @@
             Control::Host::Command::OCCReset)
         {
             // Must be a Timeout. Log an Error trace
-            log<level::ERR>("Error resetting the OCC.",
-                            entry("PATH=%s", path.c_str()),
-                            entry("SENSORID=0x%X", sensorMap.at(instance)));
+            log<level::ERR>(
+                "Error resetting the OCC.", entry("PATH=%s", path.c_str()),
+                entry("SENSORID=0x%X", std::get<0>(sensorMap.at(instance))));
         }
     }
     return;