This commit is contained in:
root 2023-07-30 15:32:38 +02:00
parent d793daf363
commit b106a15579
3 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,9 @@ def create_dsmr_protocol(dsmr_version, telegram_callback, loop=None, **kwargs):
return protocol
def _create_dsmr_protocol(dsmr_version, telegram_callback, protocol, loop=None, **kwargs):
# pylama noqa - because of "complex" (too long) if-elif-else.
# Match - case might be a solution but it is not available in <3.10
def _create_dsmr_protocol(dsmr_version, telegram_callback, protocol, loop=None, **kwargs): #noqa
"""Creates a DSMR asyncio protocol."""
if dsmr_version == '2.2':

View File

@ -94,8 +94,10 @@ class TelegramParser(object):
try:
dsmr_object = object["value_parser"].parse(match)
except ParseError:
logger.error("ignore line with signature {}, because parsing failed.".format(object["obis_reference"]),
exc_info=True)
logger.error(
"ignore line with signature {}, because parsing failed.".format(object["obis_reference"]),
exc_info=True
)
if throw_ex:
raise
except Exception as err:

View File

@ -1203,7 +1203,7 @@ ISKRA_IE = {
EON_HUNGARY = {
# Revision: 2023.02.10
# Based on V5
# Reference: https://www.eon.hu/content/dam/eon/eon-hungary/documents/Lakossagi/aram/muszaki-ugyek/p1_port%20felhaszn_interfesz_taj_%2020230210.pdf
# Reference: https://www.eon.hu/content/dam/eon/eon-hungary/documents/Lakossagi/aram/muszaki-ugyek/p1_port%20felhaszn_interfesz_taj_%2020230210.pdf # noqa
'checksum_support': True,
'objects': [
{