diff --git a/code/ota.py b/code/ota.py index 90f6a702..7e8d9f00 100755 --- a/code/ota.py +++ b/code/ota.py @@ -60,6 +60,11 @@ def on_service_state_change(zeroconf, service_type, name, state_change): for key, item in info.properties.items(): device[key.decode('UTF-8')] = item.decode('UTF-8'); + # rename fields (needed for sorting by name) + device['app'] = device['app_name'] + device['device'] = device['target_board'] + device['version'] = device['app_version'] + devices.append(device)