diff --git a/fhem.pl b/fhem.pl index 1d3113f55..b3543b8e9 100755 --- a/fhem.pl +++ b/fhem.pl @@ -167,7 +167,7 @@ my $nextat; # Time when next timer will be triggered. my $intAtCnt=0; my %duplicate; # Pool of received msg for multi-fhz/cul setups my $duplidx=0; # helper for the above pool -my $cvsid = '$Id: fhem.pl,v 1.139 2011-06-02 07:10:01 rudolfkoenig Exp $'; +my $cvsid = '$Id: fhem.pl,v 1.140 2011-06-04 08:41:22 rudolfkoenig Exp $'; my $namedef = "where is either:\n" . "- a single device name\n" . @@ -1736,10 +1736,11 @@ CommandSetstate($$) } else { + $oldvalue{$sdev}{VAL} = $d->{STATE}; + # Do not overwrite state like "opened" or "initialized" $d->{STATE} = $a[1] if($init_done || $d->{STATE} eq "???"); - $oldvalue{$sdev}{VAL} = $a[1]; # This time is not the correct one, but we do not store a timestamp for # this reading. $oldvalue{$sdev}{TIME} = TimeNow();