Update clock.yaml/clock.yaml

wife approved configuration
This commit is contained in:
void 2025-03-20 01:14:16 +00:00
parent e2a1b8841b
commit 545e3e9ff1
1 changed files with 12 additions and 21 deletions

View File

@ -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");
}
}