diff --git a/fhem/CHANGED b/fhem/CHANGED index b3b466145..5af6bb548 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,12 +1,13 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 98_TRAFFIC: v1.3.5, fixed return readings in DbLog_SplitFn - feature: attr: -a and -r Options added (Forum #83414) - feature: 20_FRM_IN: added Firmata 2.5 feature PIN_MODE_PULLUP note: requires perl-firmata 0.64 - change: 74_Unifi: SSIDs-Readings and drop-downs use goodReadingName() - feature: new module 37_NotifyAndroidTV.pm to send notifications to Notifications for Android TV/Fire TV apps (justme1968) - - bugfix: 98_TRAFFIC: v1.3.4, fixed DbLog_SplitFn, misc improvements + - bugfix: 98_TRAFFIC: v1.3.4, fixed DbLog_SplitFn, misc improvements - change: 72_FB_CALLMONITOR: reverse search provider klicktel.de is DEPRECATED and will be removed in a future release. please use dasoertliche.de instead. diff --git a/fhem/FHEM/98_TRAFFIC.pm b/fhem/FHEM/98_TRAFFIC.pm index 1e5fbda7c..9191e8b69 100644 --- a/fhem/FHEM/98_TRAFFIC.pm +++ b/fhem/FHEM/98_TRAFFIC.pm @@ -71,7 +71,7 @@ sub TRAFFIC_DbLog_split; my %TRcmds = ( 'update' => 'noArg', ); -my $TRVersion = '1.3.4'; +my $TRVersion = '1.3.5'; sub TRAFFIC_Initialize($){ @@ -789,12 +789,16 @@ sub TRAFFIC_DbLog_split($) { my @parts = split(/ /,$event); $reading = shift @parts; $reading =~ tr/://d; - $reading =~ s/^return_//; + my $alternativeReading = $reading; + $alternativeReading =~ s/^return_//; $value = join(" ",@parts); if($readings->{$reading}){ $unit = $readings->{$reading}; $value =~ s/$unit$//; #try to remove the unit from the value + }elsif($readings->{$alternativeReading}){ + $unit = $readings->{$alternativeReading}; + $value =~ s/$unit$//; #try to remove the unit from the value }else{ Log3 $hash, 5, "TRAFFIC: ($device) TRAFFIC_DbLog_split auto detect unit for reading $reading value $value"; $unit = 'min' if ($reading) =~ m/_min$/;