bugfix in timestampAge function

This commit is contained in:
Marko Oldenburg 2017-09-30 19:38:53 +02:00
parent 2a7bad25a2
commit 628a764601

View File

@ -602,8 +602,9 @@ sub XiaomiFlowerSens_CallBatteryFirmware_UpdateTimeAge($) {
my $hash = shift;
my $UpdateTimeAge = gettimeofday() - $hash->{helper}{updateTimeCallBatteryFirmware};
$hash->{helper}{updateTimeCallBatteryFirmware} = 0 if( not defined($hash->{helper}{updateTimeCallBatteryFirmware}) );
my $UpdateTimeAge = gettimeofday() - $hash->{helper}{updateTimeCallBatteryFirmware};
return $UpdateTimeAge;
}