Fix: Raspberry Pi frequency sensors discovery (#11460)

* Fix: Raspberry Pi frequency sensors discovery

* updated test data

* update test data again

* fixed Raspberry Pi codec states
This commit is contained in:
priiduonu
2020-04-23 05:53:27 +03:00
committed by GitHub
parent d2a9ffdb83
commit 4df3310d4d
4 changed files with 415 additions and 60 deletions

View File

@@ -33,7 +33,7 @@ if (!empty($pre_cache['raspberry_pi_sensors'])) {
['value' => 2, 'generic' => 0, 'graph' => 1, 'descr' => 'enabled'],
['value' => 3, 'generic' => 2, 'graph' => 1, 'descr' => 'disabled'],
];
create_state_index($state_name, $states);
create_state_index($state, $states);
discover_sensor($valid['sensor'], 'state', $device, $oid . $codec, $codec, $state, $descr, 1, 1, null, null, null, null, $value, 'snmp', $codec);
create_sensor_to_state_index($device, $state, $codec);