Skip to content

Commit

Permalink
smartmeter: fix hex string conversion again
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 committed Dec 23, 2024
1 parent de05c22 commit 1a51ab7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smartmeter/sml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a51ab7

Please sign in to comment.