diff --git a/clock.yaml/clock.yaml b/clock.yaml/clock.yaml index 1289c6c..2401f6b 100644 --- a/clock.yaml/clock.yaml +++ b/clock.yaml/clock.yaml @@ -47,21 +47,17 @@ light: restore_mode: RESTORE_AND_ON font: - - file: "gfonts://Atkinson Hyperlegible" + - file: "gfonts://Orbitron" id: dspfont - size: 100 + size: 69 - - file: "gfonts://Atkinson Hyperlegible" + - file: "gfonts://Orbitron" id: dspfont_small - size: 30 + size: 26 - - file: "gfonts://Atkinson Hyperlegible" + - file: "gfonts://Orbitron" id: dspfont_medium - size: 50 - - - file: "gfonts://Atkinson Hyperlegible" - id: dspfont_am_pm - size: 20 + size: 38 color: - id: color_white @@ -101,20 +97,15 @@ display: if (id(air_purifier_outlet1).state) { text_color = id(color_green); } - // Display the time in 12-hour format - it.strftime(0, 75, id(dspfont), text_color, TextAlign::BASELINE_LEFT, "%l:%M", id(esptime).now()); - - // Get the current month and day using a formatted string - char date_str[6]; - snprintf(date_str, sizeof(date_str), "%d/%02d", id(esptime).now().month(), id(esptime).now().day()); - - // Display the date in abbreviated weekday, m/dd or mm/dd format (no year) - it.strftime(0, 125, id(dspfont_medium), text_color, TextAlign::BASELINE, "%a %s", id(esptime).now(), date_str); - + it.strftime(0, 80, id(dspfont), text_color, TextAlign::BASELINE_LEFT, "%l:%M", id(esptime).now()); + + // Display the date in abbreviated weekday, MM/DD format (no year) + it.strftime(0, 140, id(dspfont_medium), text_color, TextAlign::BASELINE, "%a %m/%d", id(esptime).now()); + // Display "Party mode: ON" or "No fun allowed" if (id(air_purifier_outlet1).state) { it.printf(0, 230, id(dspfont_small), text_color, TextAlign::BASELINE_LEFT, "Party mode: ON"); } else { it.printf(0, 230, id(dspfont_small), text_color, TextAlign::BASELINE_LEFT, "No fun allowed"); - } + } \ No newline at end of file