32_TechemHKV.pm: timestamp at midnight for log fix2

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10514 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
herrmannj
2016-01-15 17:25:21 +00:00
parent a801993f99
commit bd4f4fc0fe

View File

@@ -119,6 +119,7 @@ TechemHKV_Receive(@) {
$hash->{VERSION} = $msg->{version}; $hash->{VERSION} = $msg->{version};
$hash->{METER} = $typeText{$msg->{type}}; $hash->{METER} = $typeText{$msg->{type}};
delete $hash->{CHANGETIME}; # clean up, workaround for fhem prior http://forum.fhem.de/index.php/topic,47474.msg391964.html#msg391964
readingsBeginUpdate($hash); readingsBeginUpdate($hash);
readingsBulkUpdate($hash, "temp1", $msg->{temp1}); readingsBulkUpdate($hash, "temp1", $msg->{temp1});
@@ -132,9 +133,8 @@ TechemHKV_Receive(@) {
readingsBeginUpdate($hash); readingsBeginUpdate($hash);
$hash->{".updateTimestamp"} = $ts; $hash->{".updateTimestamp"} = $ts;
readingsBulkUpdate($hash, "current_period", $msg->{actualVal}); readingsBulkUpdate($hash, "current_period", $msg->{actualVal});
$hash->{CHANGETIME}->[0] = $ts; $hash->{CHANGETIME}->[$#{ $hash->{CHANGED} }] = $ts;
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete $hash->{CHANGETIME};
} }
# billing period changed # billing period changed
@@ -144,9 +144,8 @@ TechemHKV_Receive(@) {
readingsBeginUpdate($hash); readingsBeginUpdate($hash);
$hash->{".updateTimestamp"} = $ts; $hash->{".updateTimestamp"} = $ts;
readingsBulkUpdate($hash, "previous_period", $msg->{lastVal}); readingsBulkUpdate($hash, "previous_period", $msg->{lastVal});
$hash->{CHANGETIME}->[0] = $ts; $hash->{CHANGETIME}->[$#{ $hash->{CHANGED} }] = $ts;
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
delete $hash->{CHANGETIME};
} }
return undef; return undef;