2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-17 05:16:02 +00:00

74_THINKINGCLEANER: fix some warnings

git-svn-id: https://svn.fhem.de/fhem/trunk@14167 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-05-02 14:12:13 +00:00
parent 45757a9313
commit eeaf2479ef

View File

@ -1517,11 +1517,18 @@ sub THINKINGCLEANER_ReceiveCommand($$$) {
$readingName = $r2; $readingName = $r2;
} }
$readingName =~ s/_(state|button|current)$//; if ($readingName && $readingName ne "") {
$readingName =~ s/[-_](\w)/\U\1/g; $readingName =~ s/_(state|button|current)$//;
$readingName =~ s/[-_](\w)/\U$1/g;
readingsBulkUpdateIfChanged( $hash, $readingName, readingsBulkUpdateIfChanged( $hash,
$v ); $readingName, $v );
}
else {
Log3 $name, 4,
"THINKINGCLEANER $name: "
. "ERROR: variable readingName is not initialized - r=$r r2=$r2 v=$v".Dumper($return);
}
} }
} }
} }