diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index f632b8819..1857c1d6f 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -1804,10 +1804,6 @@ HUEDevice_Parse($$) } } - } else { - # how can this happen? - Log3 $name, 1, "$name: HUEDevice_Parse called without \$result->{state}: ". ($HUEDevice_hasDataDumper?Dumper $result:''); - } CommandDeleteReading( undef, "$name .lastupdated" ); @@ -1819,13 +1815,13 @@ HUEDevice_Parse($$) my $i = 0; foreach my $key ( keys %readings ) { if( defined($readings{$key}) ) { - my $rut = ReadingsTimestamp($name,$key,undef); - if( !defined($result->{v2_service}) && $ts && defined($rut) && $ts <= time_str2num($rut) ) { - Log3 $name, 4, "$name: ignoring reading $key with timestamp $lastupdated, current reading timestamp is $rut"; - next; - } - if( $lastupdated ) { + my $rut = ReadingsTimestamp($name,$key,undef); + if( !defined($result->{v2_service}) && $ts && defined($rut) && $ts <= time_str2num($rut) ) { + Log3 $name, 4, "$name: ignoring reading $key with timestamp $lastupdated, current reading timestamp is $rut"; + next; + } + $hash->{'.updateTimestamp'} = $lastupdated; $hash->{CHANGETIME}[$i] = $lastupdated; }