From 36a7637151a1e45e7e043f6e35998b0a48b7e332 Mon Sep 17 00:00:00 2001 From: Morg42 <43153739+Morg42@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:02:04 +0100 Subject: [PATCH] smartmeter: disable scaler calculations --- smartmeter/sml.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/smartmeter/sml.py b/smartmeter/sml.py index ca2fb28e0..6307ecee2 100755 --- a/smartmeter/sml.py +++ b/smartmeter/sml.py @@ -518,9 +518,10 @@ def parse_frame(self, frame): 'valueRaw': entry.get_value(), 'name': OBIS_NAMES.get(entry.obis) } - if entry.scaler: - content['scaler'] = entry.scaler - content['value'] = round(content['value'] * 10 ** content['scaler'], 1) + # skip scaler calculation as the smllib has done this already + # if entry.scaler: + # content['scaler'] = entry.scaler + # content['value'] = round(content['value'] * 10 ** content['scaler'], 1) if entry.unit: content['unit'] = smlConst.UNITS.get(entry.unit) content['unitCode'] = entry.unit