From e0dae86494d53ed78b84fb2ca33d4d35498b4fcd Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Thu, 20 Jan 2022 21:13:16 +0000 Subject: [PATCH] 31_HUEDevice.pm: preliminary event timestamp fix git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25526 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/31_HUEDevice.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/FHEM/31_HUEDevice.pm b/FHEM/31_HUEDevice.pm index fd2edbdb4..731fec76a 100644 --- a/FHEM/31_HUEDevice.pm +++ b/FHEM/31_HUEDevice.pm @@ -1801,9 +1801,14 @@ HUEDevice_Parse($$) $hash->{lastupdated} = ReadingsVal( $name, '.lastupdated', '' ) if( !$hash->{lastupdated} ); $hash->{lastupdated_local} = ReadingsVal( $name, '.lastupdated_local', '' ) if( !$hash->{lastupdated_local} ); + substr($hash->{lastupdated},10, 1, '_' ); + substr($lastupdated,10, 1, '_' ); + my $hlu = SVG_time_to_sec( $hash->{lastupdated} ); + my $lu = SVG_time_to_sec( $lastupdated ); return undef if( $hash->{lastupdated} - && !defined($result->{v2_service}) - && $hash->{lastupdated} eq $lastupdated + && $hlu <= $lu + #&& !defined($result->{v2_service}) + #&& $hash->{lastupdated} eq $lastupdated && (!$readings{state} || $readings{state} eq ReadingsVal( $name, 'state', '' )) ); Log3 $name, 4, "$name: lastupdated: $lastupdated, hash->{lastupdated}: $hash->{lastupdated}, lastupdated_local: $lastupdated_local, offsetUTC: $offset";