diff --git a/g85/read.py b/g85/read.py index 8d3db06..6783484 100644 --- a/g85/read.py +++ b/g85/read.py @@ -96,7 +96,11 @@ def read_devices(el_map: ElementTree.Element) -> List[Device]: f'with attributes {el_entry.attrib}') continue - bin_code = attrib['BinCode'] + if bin_type == 'Decimal': + bin_code = int(attrib['BinCode']) + else: + bin_code = int(attrib['BinCode']) + if bin_code in device.bin_pass: logger.error(f'Bin code {bin_code} was repeated; ignoring later entry!') continue