Dynamic entPhysicalIndex values for YamlDiscovery

This commit is contained in:
Martijn Schmidt
2019-05-26 12:52:45 +02:00
parent aff2ac49e7
commit 62167ebcb2

View File

@@ -1093,7 +1093,7 @@ function discovery_process(&$valid, $device, $sensor_type, $pre_cache)
}
echo "Cur $value, Low: $low_limit, Low Warn: $low_warn_limit, Warn: $warn_limit, High: $high_limit".PHP_EOL;
$entPhysicalIndex = str_replace('{{ $index }}', $index, $data['entPhysicalIndex']) ?: null;
$entPhysicalIndex = YamlDiscovery::replaceValues('entPhysicalIndex', $index, null, $data, $pre_cache);
$entPhysicalIndex_measured = isset($data['entPhysicalIndex_measured']) ? $data['entPhysicalIndex_measured'] : null;
$sensor_name = $device['os'];