1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-22 03:33:52 +01:00
This commit is contained in:
J. Nick Koston
2025-10-17 17:01:20 -10:00
parent 6fe5a0c736
commit 0475ec5533

View File

@@ -73,10 +73,12 @@ def format_change(before: int, after: int) -> str:
# Format delta with sign and always show in bytes for precision # Format delta with sign and always show in bytes for precision
if delta > 0: if delta > 0:
delta_str = f"+{delta:,} bytes" delta_str = f"+{delta:,} bytes"
emoji = "📈" # Use 🚨 for significant increases (>1%), 🔸 for smaller ones
emoji = "🚨" if abs(percentage) > 1.0 else "🔸"
elif delta < 0: elif delta < 0:
delta_str = f"{delta:,} bytes" delta_str = f"{delta:,} bytes"
emoji = "📉" # Use 🎉 for significant reductions (>1%), ✅ for smaller ones
emoji = "🎉" if abs(percentage) > 1.0 else ""
else: else:
delta_str = "+0 bytes" delta_str = "+0 bytes"
emoji = "➡️" emoji = "➡️"