From 738067e6223391fcf3b9925707e48057eb1b2287 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 2 Oct 2017 10:08:02 -0500 Subject: [PATCH] fix: rfc1628 state sensor translations (#7416) --- includes/discovery/sensors/state/rfc1628.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/discovery/sensors/state/rfc1628.inc.php b/includes/discovery/sensors/state/rfc1628.inc.php index 9478bf5517..3ad43055c6 100644 --- a/includes/discovery/sensors/state/rfc1628.inc.php +++ b/includes/discovery/sensors/state/rfc1628.inc.php @@ -17,12 +17,13 @@ if (is_numeric($state)) { ) ); + $sensor_index = 0; discover_sensor( $valid['sensor'], 'state', $device, '.1.3.6.1.2.1.33.1.2.1.0', - 0, + $sensor_index, $state_name, 'Battery Status', 1, @@ -37,7 +38,7 @@ if (is_numeric($state)) { ); //Create Sensor To State Index - create_sensor_to_state_index($device, $state_name, $index); + create_sensor_to_state_index($device, $state_name, $sensor_index); } // Output Source (Value : 1 other, 2 none, 3 normal, 4 bypass, 5 battery, 6 booster, 7 reducer) @@ -58,12 +59,13 @@ if (is_numeric($state)) { ) ); + $sensor_index = 0; discover_sensor( $valid['sensor'], 'state', $device, '.1.3.6.1.2.1.33.1.4.1.0', - 0, + $sensor_index, $state_name, 'Output Source', 1, @@ -78,5 +80,5 @@ if (is_numeric($state)) { ); //Create Sensor To State Index - create_sensor_to_state_index($device, $state_name, $index); + create_sensor_to_state_index($device, $state_name, $sensor_index); }