From e26fb4669a445fab2ce364f5f6d4dc4ea90c8416 Mon Sep 17 00:00:00 2001 From: Kevin Zink Date: Sat, 9 Jan 2021 04:16:37 +0100 Subject: [PATCH] Change raspberry_pi_sensors state (#12390) * Change raspberry_pi_sensors state I think it is great that the codecs of a Raspberry are queried, but a non-existent codec license is not a critical sensor value. What do you think? * Update linux_raspberrypi.json * Update linux_raspberrypi.json Co-authored-by: Tony Murray --- includes/discovery/sensors/state/linux.inc.php | 2 +- tests/data/linux_raspberrypi.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/discovery/sensors/state/linux.inc.php b/includes/discovery/sensors/state/linux.inc.php index 22bfa44223..dbf6cd43d6 100644 --- a/includes/discovery/sensors/state/linux.inc.php +++ b/includes/discovery/sensors/state/linux.inc.php @@ -31,7 +31,7 @@ if (! empty($pre_cache['raspberry_pi_sensors'])) { if (stripos($value, 'abled') !== false) { $states = [ ['value' => 2, 'generic' => 0, 'graph' => 1, 'descr' => 'enabled'], - ['value' => 3, 'generic' => 2, 'graph' => 1, 'descr' => 'disabled'], + ['value' => 3, 'generic' => 3, 'graph' => 1, 'descr' => 'disabled'], ]; create_state_index($state_name, $states); diff --git a/tests/data/linux_raspberrypi.json b/tests/data/linux_raspberrypi.json index 20d24047a3..0bee4e5d05 100644 --- a/tests/data/linux_raspberrypi.json +++ b/tests/data/linux_raspberrypi.json @@ -328,7 +328,7 @@ "state_descr": "disabled", "state_draw_graph": 1, "state_value": 3, - "state_generic_value": 2 + "state_generic_value": 3 } ] }, @@ -660,7 +660,7 @@ "state_descr": "disabled", "state_draw_graph": 1, "state_value": 3, - "state_generic_value": 2 + "state_generic_value": 3 } ] }