add translated heat/eco modes to mode_str_tpl

This commit is contained in:
MichaelDvP
2026-02-02 18:52:21 +01:00
parent 95168cf514
commit be82afd778

View File

@@ -1377,15 +1377,20 @@ bool Mqtt::publish_ha_climate_config(const DeviceValue & dv, const bool has_room
snprintf(mode_str_tpl,
sizeof(mode_str_tpl),
"{%%if %s%%}off{%%elif %s=='%s'%%}heat{%%elif %s=='%s'%%}heat{%%elif %s=='%s'%%}off{%%elif %s=='%s'%%}off{%%else%%}auto{%%endif%%}",
"{%%if %s%%}off{%%elif %s=='%s'%%}heat{%%elif %s=='%s'%%}heat{%%elif %s=='%s'%%}heat{%%elif %s=='%s'%%}off{%%elif %s=='%s'%%}off{%%elif "
"%s=='%s'%%}off{%%else%%}auto{%%endif%%}",
hc_mode_cond,
hc_mode_s,
Helpers::translated_word(FL_(manual)),
hc_mode_s,
Helpers::translated_word(FL_(day)),
hc_mode_s,
Helpers::translated_word(FL_(heat)),
hc_mode_s,
Helpers::translated_word(FL_(night)),
hc_mode_s,
Helpers::translated_word(FL_(eco)),
hc_mode_s,
Helpers::translated_word(FL_(off)));
snprintf(name_s, sizeof(name_s), "%s%d", tagname, hc_num);