From 787da07457d18d050c4e3aab0fc75b136e6213fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knuti=5Fin=5FP=C3=A4se?= <122045840+PaeserBastelstube@users.noreply.github.com> Date: Fri, 13 Jan 2023 13:05:59 +0100 Subject: [PATCH] RPi: submit attributes to decoder To import some attributes to data-dict-variable, this attributes must be submit to decoder classes --- tools/rpi/hoymiles/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/rpi/hoymiles/__main__.py b/tools/rpi/hoymiles/__main__.py index 32385d11..5eb21388 100644 --- a/tools/rpi/hoymiles/__main__.py +++ b/tools/rpi/hoymiles/__main__.py @@ -118,6 +118,8 @@ def poll_inverter(inverter, dtu_ser, do_init, retries): :type retries: int """ inverter_ser = inverter.get('serial') + inverter_name = inverter.get('name') + inverter_strings = inverter.get('strings') # Queue at least status data request inv_str = str(inverter_ser) @@ -161,7 +163,10 @@ def poll_inverter(inverter, dtu_ser, do_init, retries): logging.debug(f'{c_datetime} Payload: ' + hoymiles.hexify_payload(response)) decoder = hoymiles.ResponseDecoder(response, request=com.request, - inverter_ser=inverter_ser + inverter_ser=inverter_ser, + inverter_name=inverter_name, + dtu_ser=dtu_ser, + strings=inverter_strings ) result = decoder.decode() if isinstance(result, hoymiles.decoders.StatusResponse):