core: DSMR integration breaks on 2023.11.0 for 5B
The problem
The integration breaks for model 5B on the new version (2023.11.0) of home assistant. Rerolling to 2023.10.5 does make it work again.
What version of Home Assistant Core has the issue?
2023.11.0
What was the last working version of Home Assistant Core?
2023.10.5
What type of installation are you running?
Home Assistant Container
Integration causing the issue
dsmr
Link to integration documentation on our website
https://www.home-assistant.io/integrations/dsmr
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
AttributeError: 'NoneType' object has no attribute 'get'
2023-11-01 21:07:02.957 ERROR (MainThread) [dsmr_parser.parsers] Unexpected <class 'ValueError'>: unconverted data remains: 525
2023-11-01 21:07:02.958 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.11/site-packages/serial_asyncio/__init__.py", line 120, in _read_ready
self._protocol.data_received(data)
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/clients/protocol.py", line 133, in data_received
self.handle_telegram(telegram)
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/clients/protocol.py", line 159, in handle_telegram
parsed_telegram = self.telegram_parser.parse(telegram)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/parsers.py", line 95, in parse
dsmr_object = object["value_parser"].parse(match)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/parsers.py", line 278, in parse
timestamp_occurred = ValueParser(timestamp).parse(values[i * 3 + 1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/parsers.py", line 399, in parse
value = self.coerce_type(value) if value is not None else value
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/dsmr_parser/value_types.py", line 7, in timestamp
naive_datetime = datetime.datetime.strptime(value[:-1], '%y%m%d%H%M%S')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: 525
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 6
- Comments: 27 (6 by maintainers)
Commits related to this issue
- Use BELGIUM_EQUIPMENT_IDENTIFIER in config flow The BELGIUM_EQUIPMENT_IDENTIFIER should be used as equipment identifier for 5B. As otherwise this will cause an issue when configuring the DSMR integra... — committed to dupondje/homeassistant-core by dupondje 8 months ago
- Use BELGIUM_EQUIPMENT_IDENTIFIER in config flow The BELGIUM_EQUIPMENT_IDENTIFIER should be used as equipment identifier for 5B. As otherwise this will cause an issue when configuring the DSMR integra... — committed to dupondje/homeassistant-core by dupondje 8 months ago
- Use BELGIUM_EQUIPMENT_IDENTIFIER in config flow The BELGIUM_EQUIPMENT_IDENTIFIER should be used as equipment identifier for 5B. As otherwise this will cause an issue when configuring the DSMR integra... — committed to dupondje/homeassistant-core by dupondje 8 months ago
- Update dsmr-parser to 1.3.1 to fix parsing issues Update to newer version of dsmr-parser which fixes parsing errors when the peak usage data contains invalid data. Fixes: #103233 — committed to dupondje/homeassistant-core by dupondje 8 months ago
@dupondje, i cannot install the 5B version in the DSMR Slimme meter. I get an error that it can’t be found. So i can’t start the script…