2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 23:36:37 +00:00

Fix uninitialized warnings in setting state for new devices

git-svn-id: https://svn.fhem.de/fhem/trunk@2239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-12-01 09:40:29 +00:00
parent 85400e444a
commit 0e84c331dd

View File

@ -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;