Take Unavailable and the Activate, Run and Press words from Home Assistant's frontend too

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-19 14:40:27 +02:00
parent 8fb39a52a6
commit 851c1772e5
15 changed files with 288 additions and 222 deletions
+3 -3
View File
@@ -348,9 +348,9 @@ inline std::string neighbour_option(const Tile &t, int direction) {
return options[(current + direction + count) % count];
}
inline const char *run_label(const std::string &domain) {
if (domain == "scene") return screen_text::tr(screen_text::txt::button_activate);
if (domain == "script") return screen_text::tr(screen_text::txt::button_run);
return screen_text::tr(screen_text::txt::button_press);
if (domain == "scene") return screen_text::tr(screen_text::txt::ha_button_activate);
if (domain == "script") return screen_text::tr(screen_text::txt::ha_button_run);
return screen_text::tr(screen_text::txt::ha_button_press);
}
// The Home Assistant action behind a key. STEP_* are handled locally (debounced) and return nothing.
inline Action key_action(const Tile &t, int command, const std::string &arg = "") {