2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +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 =~ s/_(state|button|current)$//;
$readingName =~ s/[-_](\w)/\U\1/g;
if ($readingName && $readingName ne "") {
$readingName =~ s/_(state|button|current)$//;
$readingName =~ s/[-_](\w)/\U$1/g;
readingsBulkUpdateIfChanged( $hash, $readingName,
$v );
readingsBulkUpdateIfChanged( $hash,
$readingName, $v );
}
else {
Log3 $name, 4,
"THINKINGCLEANER $name: "
. "ERROR: variable readingName is not initialized - r=$r r2=$r2 v=$v".Dumper($return);
}
}
}
}