From cdd09bdb94550d929ff11929e42f9b6f6d15cb51 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 11 Jan 2026 14:46:14 -1000 Subject: [PATCH] preen --- .../components/uptime/text_sensor/uptime_text_sensor.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/esphome/components/uptime/text_sensor/uptime_text_sensor.cpp b/esphome/components/uptime/text_sensor/uptime_text_sensor.cpp index 368061093af..e109576c624 100644 --- a/esphome/components/uptime/text_sensor/uptime_text_sensor.cpp +++ b/esphome/components/uptime/text_sensor/uptime_text_sensor.cpp @@ -62,14 +62,15 @@ void UptimeTextSensor::update() { // If nothing shown, show smallest enabled unit if (!show_days && !show_hours && !show_minutes && !show_seconds) { - if (seconds_enabled) + if (seconds_enabled) { show_seconds = true; - else if (minutes_enabled) + } else if (minutes_enabled) { show_minutes = true; - else if (hours_enabled) + } else if (hours_enabled) { show_hours = true; - else + } else { show_days = true; + } } // Build output string on stack