Skip to content

Commit

Permalink
Sort the data alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
EmberLightVFX committed Oct 9, 2024
1 parent e00d839 commit 20b067f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/update_sensors_and_generate_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def extract_dual_numbers(text: str) -> list[float]:
"diagonal": round(math.sqrt(inches[0] ** 2 + inches[1] ** 2), 3),
}

# Sort the data:
sensors_data = {
key: dict(sorted(value.items())) for key, value in sorted(sensors_data.items())
}

# Write the updated dictionary back to sensors.json
if DEBUG:
Expand Down

0 comments on commit 20b067f

Please sign in to comment.