Edit the-saloon.yaml

This commit is contained in:
ESPHome Device Builder 2026-10-23 12:50:47 +02:00
parent 53d4a9dd14
commit 64b0a287f0

View File

@ -79,9 +79,9 @@ display:
// it.printf(10, 105, id(roboto), "HDD");
if (id(nas_disk_percent).has_state()) {
float pct = id(nas_disk_percent).state;
int x = 10, y = 135, w = 300, h = 22;
int x = 10, y = 70, w = 300, h = 22;
Color c = pct > 90 ? Color(255, 0, 0) : (pct > 75 ? Color(255, 165, 0) : Color(0, 200, 0));
it.filled_rectangle(x + 2, y + 2, (int)((w - 4) * pct / 100.0f), h - 4, c);
it.filled_rectangle(x, y, (int)((w) * pct / 100.0f), h, c);
it.printf(10, 50, id(roboto), "%.1f%%", pct);
}