Added Packetlight PL2000 support (#11782)

convert Watts to Dbm and call user_function on limits
dbm graphs summary
pl1000eTests update
Tests OK
This commit is contained in:
O Palivan
2020-06-05 20:58:34 +02:00
committed by GitHub
parent a8448a0dff
commit 53e9579ae9
18 changed files with 12331 additions and 301 deletions

View File

@@ -1068,6 +1068,9 @@ function discovery_process(&$valid, $device, $sensor_class, $pre_cache)
if (is_numeric($$limit)) {
$$limit = ($$limit / $divisor) * $multiplier;
}
if (is_numeric($$limit) && isset($user_function) && is_callable($user_function)) {
$$limit = $user_function($$limit);
}
}
}