Skip to content

Commit

Permalink
Added a white space in the sensor matching to prevent TempSpare10 fro…
Browse files Browse the repository at this point in the history
…m matching TempSpare1

	modified:   AnalogSensor_Item.pm
  • Loading branch information
hplato committed Feb 17, 2015
1 parent ba86224 commit 67db903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AnalogSensor_Item.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 67db903

Please sign in to comment.