Show heat_cool icon when dual climate add-on installed

This commit is contained in:
Edward Firmo
2024-01-02 13:54:32 +01:00
parent 07fda78fdc
commit e45d07cfd7

View File

@@ -134,20 +134,20 @@ script:
// Update buttons bar
// Hide not supported hotspots
disp1->hide_component("button01");
disp1->hide_component("button02");
if (${addon_climate_heat}) disp1->show_component("button03"); else disp1->hide_component("button03"); //Heat
if (${addon_climate_cool}) disp1->show_component("button04"); else disp1->hide_component("button04"); //Cool
if (${addon_climate_dual}) disp1->hide_component("button02");
if (${addon_climate_heat} or ${addon_climate_dual}) disp1->show_component("button03"); else disp1->hide_component("button03"); //Heat
if (${addon_climate_cool} or ${addon_climate_dual}) disp1->show_component("button04"); else disp1->hide_component("button04"); //Cool
disp1->hide_component("button05");
disp1->hide_component("button06");
disp1->show_component("button07"); //Off
// Set buttons colors
disp1->set_component_font_color("climate.button01", 6339);
disp1->set_component_font_color("climate.button02", 6339);
disp1->set_component_font_color("climate.button03", (thermostat_embedded->mode==climate::CLIMATE_MODE_HEAT) ? 64164 : ((${addon_climate_heat}) ? 48631 : 6339));
disp1->set_component_font_color("climate.button04", (thermostat_embedded->mode==climate::CLIMATE_MODE_COOL) ? 1055 : ((${addon_climate_cool}) ? 48631 : 6339));
disp1->set_component_font_color("climate.button05", 6339);
disp1->set_component_font_color("climate.button06", 6339);
disp1->set_component_font_color("climate.button07", (thermostat_embedded->mode==climate::CLIMATE_MODE_OFF) ? 10597 : 35921);
disp1->set_component_font_color("button01", 6339);
disp1->set_component_font_color("button02", (thermostat_embedded->mode==climate::CLIMATE_MODE_HEAT_COOL) ? 65535 : ((${addon_climate_dual}) ? 48631 : 6339));
disp1->set_component_font_color("button03", (thermostat_embedded->mode==climate::CLIMATE_MODE_HEAT) ? 64164 : ((${addon_climate_heat} or ${addon_climate_dual}) ? 48631 : 6339));
disp1->set_component_font_color("button04", (thermostat_embedded->mode==climate::CLIMATE_MODE_COOL) ? 1055 : ((${addon_climate_cool} or ${addon_climate_dual}) ? 48631 : 6339));
disp1->set_component_font_color("button05", 6339);
disp1->set_component_font_color("button06", 6339);
disp1->set_component_font_color("button07", (thermostat_embedded->mode==climate::CLIMATE_MODE_OFF) ? 10597 : 35921);
}
- id: !extend page_changed