Closed ejpalacios closed 8 months ago
Might want to prefer #143 ? As this will hide the value is not set by just setting a default value. I might prefer to just handle the fact that the value can be None.
@dupondje why would you want to fill in defaults. I think this simple fix works too.
@jbouwh : this PR adds a default value if the occured timestamp can't be parsed. It might be cleaner to just handle the fact the value can be invalid and set it to None like #143 does. Cause then the client of the library does know the value was non-existent/invalid instead of some default/current timestamp value.
@dupondje your approach makes more sense
For the entry
BELGIUM_MAXIMUM_DEMAND_13_MONTHS
, if there is no consumption at all during a given month, the value of theoccurred
field in that given month will have an invalid timestamp. Something like:632525252525W
.See below the snipped of a telegram containing this type of reading. The change suggested in this PR is to default to the timestamp of the month.