Skip to content

Commit

Permalink
if occurred time is not initialised default to timestamp of the month
Browse files Browse the repository at this point in the history
  • Loading branch information
ejpalacios committed Oct 19, 2023
1 parent 8892362 commit 160b209
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dsmr_parser/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ def parse(self, line):
for i in range(1, count + 1):
timestamp_month = ValueParser(timestamp).parse(values[i * 3 + 0])
timestamp_occurred = ValueParser(timestamp).parse(values[i * 3 + 1])
if timestamp_occurred["value"] is None:
timestamp_occurred["value"] = timestamp_month["value"]
value = ValueParser(Decimal).parse(values[i * 3 + 2])
objects.append(MBusObjectPeak(
obis_id_code=obis_id_code,
Expand Down

0 comments on commit 160b209

Please sign in to comment.