diff --git a/smartmeter/sml.py b/smartmeter/sml.py index 3e7c134f3..ca2fb28e0 100755 --- a/smartmeter/sml.py +++ b/smartmeter/sml.py @@ -553,7 +553,8 @@ def parse_frame(self, frame): # Convert some special OBIS values into nicer format # EMH ED300L: add additional OBIS codes if code == '1-0:96.5.0*255': - content['value'] = bin(int(content['valueRaw'], 16) >> 8) # Status as binary string, so not decoded into status bits as above + val = int(content['valueRaw'], 16) + content['value'] = bin(val >> 8) # Status as binary string, so not decoded into status bits as above # end TODO # don't return multiple code, only the last one -> overwrite earlier data