mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
FRITZBOX: fixed reset of day counter
git-svn-id: https://svn.fhem.de/fhem/trunk@10600 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5ac737d0a4
commit
2b53d69a9b
@ -1575,10 +1575,15 @@ sub FRITZBOX_Readout_Process($$)
|
||||
# Statistics
|
||||
if ( defined $values{".box_TodayBytesReceivedLow"} && defined $hash->{READINGS}{".box_TodayBytesReceivedLow"}) {
|
||||
my $valueHigh = $values{".box_TodayBytesReceivedHigh"} - $hash->{READINGS}{".box_TodayBytesReceivedHigh"}{VAL};
|
||||
my $valueLow = $values{".box_TodayBytesReceivedLow"} - $hash->{READINGS}{".box_TodayBytesReceivedLow"}{VAL};
|
||||
# Consider reset of day counter
|
||||
if ($valueHigh < 0 || $valueHigh == 0 && $valueLow < 0) {
|
||||
$valueLow = $values{".box_TodayBytesReceivedLow"};
|
||||
$valueHigh = $values{".box_TodayBytesReceivedHigh"};
|
||||
}
|
||||
# FRITZBOX_Log $hash, 5, "valueHigh $valueHigh";
|
||||
$valueHigh *= 2**22;
|
||||
# FRITZBOX_Log $hash, 5, "valueHigh $valueHigh";
|
||||
my $valueLow = $values{".box_TodayBytesReceivedLow"} - $hash->{READINGS}{".box_TodayBytesReceivedLow"}{VAL};;
|
||||
# FRITZBOX_Log $hash, 5, "valueLow $valueLow";
|
||||
$valueLow /= 2**10;
|
||||
# FRITZBOX_Log $hash, 5, "valueLow $valueLow";
|
||||
|
Loading…
x
Reference in New Issue
Block a user