Every percentage and unit on the screens spaced like Home Assistant, also the tile values and YAML lambdas

The standard tile still joined a unit with a space, and the climate status, cover and light values and the slider
overlay wrote their own "%": all go through screen_text::with_unit / percent now (54% in Spanish, 54 % in German).
Found on the Guition in the end-to-end test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-19 17:24:33 +02:00
parent f02f429188
commit f7c452e7a7
4 changed files with 6 additions and 12 deletions
+3 -7
View File
@@ -3925,9 +3925,7 @@ script:
} else if (pct >= 100) {
value_text = open_label;
} else {
char buf[40];
snprintf(buf, sizeof(buf), "%s - %d%%", open_label.c_str(), pct);
value_text = buf;
value_text = open_label + " - " + screen_text::percent(pct);
}
} else {
if (pct <= 0) {
@@ -4075,7 +4073,7 @@ script:
if (mode == "none") return;
id(active_entity) = entity;
id(active_value_suffix) = " %";
id(active_value_suffix) = screen_text::percent_sign();
id(active_label_off) = label_off;
id(active_label_on) = label_on;
id(active_title) = title;
@@ -4184,9 +4182,7 @@ script:
} else if (pct >= 100) {
value_text = label_on;
} else {
char buf[40];
snprintf(buf, sizeof(buf), "%s - %d%%", label_on.c_str(), pct);
value_text = buf;
value_text = label_on + " - " + screen_text::percent(pct);
}
} else {
if (pct <= 0) {