Regex for BELGIUM_MAXIMUM_DEMAND_MONTH will also match strings intended for BELGIUM_MAXIMUM_DEMAND_13_MONTHS.
This results in an error, for example:
ignore line with signature \d-\d:1\.6\.0.+?\r\n, because parsing failed.
Traceback (most recent call last):
File "/opt/homebrew/anaconda3/envs/dsmr-mqtt/lib/python3.10/site-packages/dsmr_parser/parsers.py", line 90, in parse
dsmr_object = parser.parse(match)
File "/opt/homebrew/anaconda3/envs/dsmr-mqtt/lib/python3.10/site-packages/dsmr_parser/parsers.py", line 226, in parse
values=self._parse(line)
File "/opt/homebrew/anaconda3/envs/dsmr-mqtt/lib/python3.10/site-packages/dsmr_parser/parsers.py", line 198, in _parse
raise ParseError("Invalid '%s' line for '%s'", line, self)
dsmr_parser.exceptions.ParseError: ("Invalid '%s' line for '%s'", '1-0:1.6.0)(1-0:1.6.0)(230101000000W)(221209193000W)(10.000*kW)(230201000000W)(230130184500W)(05.000*kW)\r\n', <dsmr_parser.parsers.MBusParser object at 0x1021aa170>)
We can avoid this by adding a negative lookbehind on '(' to the regex of BELGIUM_MAXIMUM_DEMAND_MONTH.
Regex for BELGIUM_MAXIMUM_DEMAND_MONTH will also match strings intended for BELGIUM_MAXIMUM_DEMAND_13_MONTHS. This results in an error, for example:
We can avoid this by adding a negative lookbehind on '(' to the regex of BELGIUM_MAXIMUM_DEMAND_MONTH.