DCMI: Handled Sensor Name format in ipmi/dcmi/test_dcmi_get_temperature_reading.robot

Changes:
  - Modified script considering for space and underscore between sensor name

Tested:
  - Ran ipmi/dcmi/test_dcmi_get_temperature_reading.robot

Change-Id: I8e1d95885a77cc02f05757da89cb46a627d526ab
Signed-off-by: Ishwarya Mathi M <ishwaryamm@ami.com>
diff --git a/ipmi/dcmi/test_dcmi_get_temperature_reading.robot b/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
index 5e3357e..c6698ea 100644
--- a/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
+++ b/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
@@ -186,6 +186,15 @@
     ${dbus_uri}=  Get From Dictionary  ${dbus_uris}  ${instance}
     ${sensor_name}=  Set Variable  ${dbus_uri.split('/')[-1]}
 
+    ${sensor_format}=  Run IPMI Standard Command  sensor
+    ${sensor_name_status}=  Run Keyword And Return Status  Should Contain
+    ...  ${sensor_format}  _
+
+    ${sensor_name}=  Run Keyword If  ${sensor_name_status} == True
+    ...    Set Variable  ${sensor_name_dbus}
+    ...  ELSE
+    ...    Replace String  ${sensor_name}  _  ${SPACE}
+
     ${ret}=  Run External IPMI Standard Command  sensor | grep -i "${sensor_name}"
 
     [Return]  ${ret}