My bad (x2)

This commit is contained in:
2025-12-30 15:37:01 +01:00
parent 21bebea92d
commit 7dc1dc9d94

View File

@@ -19,7 +19,7 @@ class RfidReader(SerialReader):
hex_value = data[5:11].decode(errors='ignore') hex_value = data[5:11].decode(errors='ignore')
try: try:
res = int(hex_value, 16) res = int(hex_value, 16)
formatted_res = f'{{"uid": {data}}}' formatted_res = f'{{"uid": {res}}}'
self._notify(formatted_res) self._notify(formatted_res)
except ValueError: except ValueError:
print("Invalid hex:", hex_value) print("Invalid hex:", hex_value)