Skip to content

Commit

Permalink
smartmeter: fix hex string decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 committed Dec 23, 2024
1 parent 9470e97 commit de05c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smartmeter/sml.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ 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(content['valueRaw'] >> 8) # Status as binary string, so not decoded into status bits as above
content['value'] = bin(int(content['valueRaw'], 16) >> 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
Expand Down

0 comments on commit de05c22

Please sign in to comment.