Fix uninitialized warnings in setting state for new devices
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -2706,7 +2706,9 @@ sub
|
||||
setReadingsVal($$$$)
|
||||
{
|
||||
my ($hash,$rname,$val,$ts) = @_;
|
||||
if($rname eq "state" && $hash->{READINGS}{$rname}{VAL} ne $val) {
|
||||
if($rname eq "state" &&
|
||||
$hash->{READINGS}{$rname} &&
|
||||
$hash->{READINGS}{$rname}{VAL} ne $val) {
|
||||
$hash->{STATE} = $val;
|
||||
}
|
||||
$hash->{READINGS}{$rname}{VAL} = $val;
|
||||
|
||||
Reference in New Issue
Block a user