mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
98_DOIF.pm: fixed
filter starting with "d..." in reading formatting git-svn-id: https://svn.fhem.de/fhem/trunk@27485 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1d3562bcd7
commit
e0e522ed08
@ -1313,7 +1313,7 @@ sub ReadingValDoIf
|
|||||||
}
|
}
|
||||||
DOIF_setValue_bar($hash,\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}});
|
DOIF_setValue_bar($hash,\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}});
|
||||||
return (\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}});
|
return (\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}});
|
||||||
} elsif ($regExp =~ /^d(\d)?/) {
|
} elsif ($regExp =~ /^d(\d)?$/) {
|
||||||
my $round=$1;
|
my $round=$1;
|
||||||
$r = ($r =~ /(-?\d+(\.\d+)?)/ ? $1 : 0);
|
$r = ($r =~ /(-?\d+(\.\d+)?)/ ? $1 : 0);
|
||||||
$r = round ($r,$round) if (defined $round);
|
$r = round ($r,$round) if (defined $round);
|
||||||
@ -2291,7 +2291,7 @@ sub ReplaceReadingDoIf
|
|||||||
$hash->{$bartype}{"$name $reading"}{"$num $period"}{timeOffset} = (defined $timeOffset and $timeOffset ne "") ? $timeOffset : 0;
|
$hash->{$bartype}{"$name $reading"}{"$num $period"}{timeOffset} = (defined $timeOffset and $timeOffset ne "") ? $timeOffset : 0;
|
||||||
DOIF_setValue_bar($hash,\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}},undef,1);
|
DOIF_setValue_bar($hash,\%{$hash->{$bartype}{"$name $reading"}{"$num $period"}},undef,1);
|
||||||
}
|
}
|
||||||
} elsif ($format =~ /^(d[^:]*)(?::(.*))?/) {
|
} elsif ($format =~ /^(d\d)(?::(.*))?/) {
|
||||||
$regExp =$1;
|
$regExp =$1;
|
||||||
$output=$2;
|
$output=$2;
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user