Haltezeit: Stufe 3,5 Std. und lesbare Angabe in Stunden

Die 3,5 Stunden fallen aus der Reihe, weil sie aus einem konkreten Fall
stammen: dauerhafter Wasserverbrauch. Kuerzer waere Fehlalarm (eine lange
Dusche, eine Waschmaschine), laenger liefe ein offener Hahn eine halbe
Nacht. Die 3 Std. weichen dafuer - niemand hat sie benutzt.

Dazu haltezeitKurz(): ab einer Stunde in Stunden statt in Minuten. "210
Min." muss man umrechnen, "3,5 Std." nicht. Die Beschriftungen der
Auswahlliste kommen jetzt aus derselben Funktion wie die Uebersichtszeile,
das JavaScript hat eine gleichlautende.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-21 09:10:55 +02:00
co-authored by Claude Opus 5
parent 01d04e8f56
commit e3ac9bad37
3 changed files with 37 additions and 12 deletions
+7 -3
View File
@@ -1126,9 +1126,7 @@ function rahmenKurzText() {
teile.push(autoModel.window_from === "00:00" && autoModel.window_to === "23:59"
? "rund um die Uhr"
: autoModel.window_from + "" + autoModel.window_to);
if (autoModel.hold_secs > 0) {
teile.push("erst nach " + Math.floor(autoModel.hold_secs / 60) + " Min.");
}
if (autoModel.hold_secs > 0) teile.push("erst nach " + haltezeitKurz(autoModel.hold_secs));
if (autoModel.lockout_secs > 0) {
teile.push("Sperre " + (autoModel.lockout_secs >= 60
? Math.floor(autoModel.lockout_secs / 60) + " Min."
@@ -1139,6 +1137,12 @@ function rahmenKurzText() {
return teile.join(" · ");
}
/** Wie haltezeitKurz() in automations.php: Minuten bis eine Stunde, dann Stunden. */
function haltezeitKurz(sekunden) {
if (sekunden < 3600) return Math.floor(sekunden / 60) + " Min.";
return (sekunden / 3600).toFixed(1).replace(/[.,]0$/, "").replace(".", ",") + " Std.";
}
function rahmenIstVorgabe() {
return autoModel.weekdays === 127
&& autoModel.on_vacation === 1