Remove unused function (#14283)

duplicates other functionality
This commit is contained in:
Tony Murray
2022-09-04 13:04:55 +03:00
committed by GitHub
parent 9f39acd615
commit c2761b4e12
2 changed files with 4 additions and 15 deletions
@@ -22,7 +22,10 @@
* @copyright 2017 Neil Lathwood
* @author Neil Lathwood <[email protected]>
*/
$value = return_number(snmp_get($device, 'climateHumidity', '-Oqv', 'GEIST-MIB-V3'));
use LibreNMS\Util\Number;
$value = Number::cast(SnmpQuery::get('GEIST-MIB-V3::climateHumidity')->value());
if ($value) {
$current_oid = '.1.3.6.1.4.1.21239.2.2.1.7.1';
$descr = 'Humidity';
-14
View File
@@ -264,20 +264,6 @@ function apc_relay_state($state)
}
}
/**
* @param $value
* @return mixed
*/
function return_number($value)
{
preg_match('/[\d\.\-]+/', $value, $temp_response);
if (! empty($temp_response[0])) {
$value = $temp_response[0];
}
return $value;
}
function parse_entity_state($state, $value)
{
$data = [