Skip to content

Commit

Permalink
smartmeter: disable scaler calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 committed Dec 26, 2024
1 parent 1a51ab7 commit 36a7637
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smartmeter/sml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 36a7637

Please sign in to comment.