mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
31_HUEDevice.pm: preliminary event timestamp fix
git-svn-id: https://svn.fhem.de/fhem/trunk@25527 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
309a410569
commit
409e0f8767
@ -1801,15 +1801,17 @@ HUEDevice_Parse($$)
|
|||||||
|
|
||||||
$hash->{lastupdated} = ReadingsVal( $name, '.lastupdated', '' ) if( !$hash->{lastupdated} );
|
$hash->{lastupdated} = ReadingsVal( $name, '.lastupdated', '' ) if( !$hash->{lastupdated} );
|
||||||
$hash->{lastupdated_local} = ReadingsVal( $name, '.lastupdated_local', '' ) if( !$hash->{lastupdated_local} );
|
$hash->{lastupdated_local} = ReadingsVal( $name, '.lastupdated_local', '' ) if( !$hash->{lastupdated_local} );
|
||||||
|
|
||||||
substr($hash->{lastupdated},10, 1, '_' );
|
substr($hash->{lastupdated},10, 1, '_' );
|
||||||
substr($lastupdated,10, 1, '_' );
|
substr($lastupdated,10, 1, '_' );
|
||||||
my $hlu = SVG_time_to_sec( $hash->{lastupdated} );
|
my $hlu = SVG_time_to_sec( $hash->{lastupdated} );
|
||||||
my $lu = SVG_time_to_sec( $lastupdated );
|
my $lu = SVG_time_to_sec( $lastupdated );
|
||||||
return undef if( $hash->{lastupdated}
|
return undef if( $hash->{lastupdated}
|
||||||
&& $hlu <= $lu
|
&& $hlu <= $lu
|
||||||
#&& !defined($result->{v2_service})
|
&& !defined($result->{v2_service})
|
||||||
#&& $hash->{lastupdated} eq $lastupdated
|
#&& $hash->{lastupdated} eq $lastupdated
|
||||||
&& (!$readings{state} || $readings{state} eq ReadingsVal( $name, 'state', '' )) );
|
&& (!$readings{state} || $readings{state} eq ReadingsVal( $name, 'state', '' ))
|
||||||
|
);
|
||||||
|
|
||||||
Log3 $name, 4, "$name: lastupdated: $lastupdated, hash->{lastupdated}: $hash->{lastupdated}, lastupdated_local: $lastupdated_local, offsetUTC: $offset";
|
Log3 $name, 4, "$name: lastupdated: $lastupdated, hash->{lastupdated}: $hash->{lastupdated}, lastupdated_local: $lastupdated_local, offsetUTC: $offset";
|
||||||
#Log3 $name, 5, "$name: ". Dumper $result if($HUEDevice_hasDataDumper);
|
#Log3 $name, 5, "$name: ". Dumper $result if($HUEDevice_hasDataDumper);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user