2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

fhem.pl: avoid PERL WARNING in ReadingsNum

git-svn-id: https://svn.fhem.de/fhem/trunk@6777 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-10-18 05:25:57 +00:00
parent f4e30d9f91
commit d51f9aa5bc

View File

@ -3348,9 +3348,11 @@ ReadingsVal($$$)
sub
ReadingsNum($$$)
{
{
my ($d,$n,$default) = @_;
return ReadingsVal($d,$n,$default)+0;
my $val = ReadingsVal($d,$n,$default);
$val =~ s/[^-\.\d]//g;
return $val;
}
sub