mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
THINKINGCLEANER: fix uninitialized value
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14100 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c24d9bd44
commit
aa93079c83
@ -132,6 +132,8 @@ sub THINKINGCLEANER_Undefine($$$) {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub THINKINGCLEANER_Set($$$);
|
||||||
|
|
||||||
sub THINKINGCLEANER_Set($$$) {
|
sub THINKINGCLEANER_Set($$$) {
|
||||||
my ( $hash, $a, $h ) = @_;
|
my ( $hash, $a, $h ) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
@ -1317,6 +1319,7 @@ sub THINKINGCLEANER_ReceiveCommand($$$) {
|
|||||||
$rPrefix = "sensor" if ( $r eq "sensors" );
|
$rPrefix = "sensor" if ( $r eq "sensors" );
|
||||||
|
|
||||||
foreach my $r2 ( keys %{ $return->{$r} } ) {
|
foreach my $r2 ( keys %{ $return->{$r} } ) {
|
||||||
|
next unless ( $r2 && $r2 ne "" );
|
||||||
|
|
||||||
# INTERNALS or dynamic values
|
# INTERNALS or dynamic values
|
||||||
if ( $r2 eq "cleaning" ) {
|
if ( $r2 eq "cleaning" ) {
|
||||||
@ -1517,9 +1520,8 @@ sub THINKINGCLEANER_ReceiveCommand($$$) {
|
|||||||
$readingName =~ s/_(state|button|current)$//;
|
$readingName =~ s/_(state|button|current)$//;
|
||||||
$readingName =~ s/[-_](\w)/\U\1/g;
|
$readingName =~ s/[-_](\w)/\U\1/g;
|
||||||
|
|
||||||
readingsBulkUpdate( $hash, $readingName, $v )
|
readingsBulkUpdateIfChanged( $hash, $readingName,
|
||||||
if (
|
$v );
|
||||||
ReadingsVal( $name, $readingName, "" ) ne $v );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user