bugfix in timestampAge function
This commit is contained in:
parent
2a7bad25a2
commit
628a764601
@ -602,8 +602,9 @@ sub XiaomiFlowerSens_CallBatteryFirmware_UpdateTimeAge($) {
|
|||||||
|
|
||||||
my $hash = shift;
|
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;
|
return $UpdateTimeAge;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user