2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

31_HUEDevice.pm: better debug output

git-svn-id: https://svn.fhem.de/fhem/trunk@25536 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2022-01-21 15:56:47 +00:00
parent f99c8dfde5
commit 9d3cd65d1e

View File

@ -1803,6 +1803,11 @@ HUEDevice_Parse($$)
$readings{$entry} = $state->{$entry} if( defined($state->{$entry}) );
}
}
} else {
# how can this happen?
Log3 $name, 1, "$name: HUEDevice_Parse called without \$result->{state}: ". ($HUEDevice_hasDataDumper?Dumper $result:'');
}
CommandDeleteReading( undef, "$name .lastupdated" );
@ -1815,7 +1820,7 @@ HUEDevice_Parse($$)
foreach my $key ( keys %readings ) {
if( defined($readings{$key}) ) {
my $rut = ReadingsTimestamp($name,$key,undef);
if( !defined($result->{v2_service}) && defined($rut) && $ts <= time_str2num($rut) ) {
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;
}