From 67db9033a110cb9d397bc45302ed5b120e9b04e5 Mon Sep 17 00:00:00 2001 From: H Plato Date: Mon, 16 Feb 2015 21:11:11 -0700 Subject: [PATCH] Added a white space in the sensor matching to prevent TempSpare10 from matching TempSpare1 modified: AnalogSensor_Item.pm --- lib/AnalogSensor_Item.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AnalogSensor_Item.pm b/lib/AnalogSensor_Item.pm index 7bdf3140d..d87958855 100644 --- a/lib/AnalogSensor_Item.pm +++ b/lib/AnalogSensor_Item.pm @@ -292,7 +292,7 @@ sub map_to_weather { my $rrd_ref = &AnalogSensor_Item::weather_to_rrd(lc $p_hash_ref); my $sensor_names = $main::config_parms{weather_graph_sensor_names}; if ($sensor_names) { - if ($sensor_names !~ /$rrd_ref/i) { + if ($sensor_names !~ /$rrd_ref\W/i) { $sensor_names .= ", $rrd_ref => $p_sensor_name"; $main::config_parms{weather_graph_sensor_names} = $sensor_names; print "[AnalogSensor] weather_graph_sensor_names: $sensor_names\n" if $main::Debug{analogsensor};