Add Maximum for calculation sensor uses
Add a type - Maximum for calculation sensor uses.
There are too many NVMe temperature sensors of the same type.
The fan speed regulation strategy only requires a maximum hard
disk temperature, which can be used as a PID parameter.
The sensor list does not need to know all the NVMe temperatures,
but only the maximum temperature of the NVMe.
For example:
In my machine has two sets of NVMes, one is 24 NVMe,
the other is 4 NVMe disks, but only the maximum temperature
of the two sets is required to participate in PID
and display to the customer.
Tested:
Need to add code to photoshop-virtual-sensor to calculate sensor value.
usage like:
in entity-manager/baseboard.json:
add virtual sensor use Type=Maximum:
```
{
"Exposes": [
{
"Name": "NVMe MAX Temp",
"Sensors": [
"NVMe 0 Temp",
"NVMe 1 Temp",
"NVMe 2 Temp",
"NVMe 3 Temp",
"NVMe 4 Temp"
],
"Thresholds": [
{
"Direction": "greater than",
"Name": "upper critical",
"Severity": 1,
"Value": 116
},
{
"Direction": "less than",
"Name": "lower critical",
"Severity": 1,
"Value": 1
}
],
"Type": "Maximum",
"Units": "DegreesC"
}
],
"Logging": "Off",
"Name": "NVMe MAX",
"Probe": "TRUE",
"Type": "NVMe"
}
```
Signed-off-by: Tao Lin <lintao.lc@inspur.com>
Change-Id: Id0f2c465200301c95bf54b19f11a5962d662d164
diff --git a/schemas/virtual_sensor.json b/schemas/virtual_sensor.json
index 3584489..77c39c9 100644
--- a/schemas/virtual_sensor.json
+++ b/schemas/virtual_sensor.json
@@ -52,7 +52,7 @@
"The type of calculation this sensor uses."
],
"type": "string",
- "enum": ["ModifiedMedian"]
+ "enum": ["ModifiedMedian", "Maximum"]
},
"Units": {
"description": [