mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-09 20:57:11 +00:00
98_TRAFFIC: v1.3.5, fixed return readings in DbLog_SplitFn
git-svn-id: https://svn.fhem.de/fhem/trunk@16020 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d902fae662
commit
df0f6b5353
@ -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.
|
||||
|
@ -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$/;
|
||||
|
Loading…
x
Reference in New Issue
Block a user