diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py index a12ecbc65d89..28d62aa0152b 100644 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py @@ -21,11 +21,12 @@ class Psu(PsuBase): # { PSU-ID: { Sensor-Name: Sensor-ID } } SENSOR_MAPPING = { 1: { "State": 0x2f, "Current": 0x37, - "Power": 0x38, "Voltage": 0x36, + "Power": 0x38, "Voltage": 0x36, "Temperature": 0x35 }, 2: { "State": 0x39, "Current": 0x41, - "Power": 0x42, "Voltage": 0x40, + "Power": 0x42, "Voltage": 0x40, "Temperature": 0x3F } } + # ( PSU-ID: FRU-ID } FRU_MAPPING = { 1: 3, 2: 4 } @@ -119,13 +120,24 @@ def get_voltage_low_threshold(self): """ Returns PSU low threshold in Volts """ - return 11.4 + is_valid, low_threshold = self.voltage_sensor.get_threshold("LowerCritical") + if not is_valid: + low_threshold = 11.4 + low_threshold = "{:.2f}".format(low_threshold) + + return float(low_threshold) + def get_voltage_high_threshold(self): """ Returns PSU high threshold in Volts """ - return 12.6 + is_valid, high_threshold = self.voltage_sensor.get_threshold("UpperCritical") + if not is_valid: + high_threshold = 12.6 + high_threshold = "{:.2f}".format(high_threshold) + + return float(high_threshold) def get_temperature(self): """ @@ -145,7 +157,13 @@ def get_temperature_high_threshold(self): """ Returns the high temperature threshold for PSU in Celsius """ - return 45.0 + is_valid, high_threshold = self.temp_sensor.get_threshold("UpperCritical") + if not is_valid: + high_threshold = 113 + high_threshold = "{:.2f}".format(high_threshold) + + return float(high_threshold) + def get_current(self): """