From 6c7afe5bfe5405dbf52d9ab45a0ae782c5a19704 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 2 Sep 2023 12:14:10 +0200 Subject: [PATCH] Fix button show on climate page Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335 --- nspanel_esphome_addon_climate_cool.yaml | 18 +++++++++--------- nspanel_esphome_addon_climate_heat.yaml | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/nspanel_esphome_addon_climate_cool.yaml b/nspanel_esphome_addon_climate_cool.yaml index ee5eff6..eb73484 100644 --- a/nspanel_esphome_addon_climate_cool.yaml +++ b/nspanel_esphome_addon_climate_cool.yaml @@ -153,18 +153,18 @@ script: - lambda: |- ESP_LOGV("script.addon_climate_update_page_climate", "Updating buttons bar"); // Hide not supported hotspots - id(disp1).hide_component("climate.button01"); - id(disp1).hide_component("climate.button02"); - id(disp1).show_component("climate.button03"); //Heat - id(disp1).hide_component("climate.button04"); - id(disp1).hide_component("climate.button05"); - id(disp1).hide_component("climate.button06"); - id(disp1).show_component("climate.button07"); //Off + id(disp1).hide_component("button01"); + id(disp1).hide_component("button02"); + id(disp1).hide_component("button03"); //Heat + id(disp1).show_component("button04"); //Cool + id(disp1).hide_component("button05"); + id(disp1).hide_component("button06"); + id(disp1).show_component("button07"); //Off // Set buttons colors id(disp1).set_component_font_color("climate.button01_icon", 10597); id(disp1).set_component_font_color("climate.button02_icon", 10597); - id(disp1).set_component_font_color("climate.button03_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_HEAT) ? 64164 : 48631); - id(disp1).set_component_font_color("climate.button04_icon", 10597); + id(disp1).set_component_font_color("climate.button03_icon", 10597); + id(disp1).set_component_font_color("climate.button04_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_COOL) ? 1055 : 48631); id(disp1).set_component_font_color("climate.button05_icon", 10597); id(disp1).set_component_font_color("climate.button06_icon", 10597); id(disp1).set_component_font_color("climate.button07_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_OFF) ? 35921 : 48631); diff --git a/nspanel_esphome_addon_climate_heat.yaml b/nspanel_esphome_addon_climate_heat.yaml index 1090368..5d40499 100644 --- a/nspanel_esphome_addon_climate_heat.yaml +++ b/nspanel_esphome_addon_climate_heat.yaml @@ -153,13 +153,13 @@ script: - lambda: |- ESP_LOGV("script.addon_climate_update_page_climate", "Updating buttons bar"); // Hide not supported hotspots - id(disp1).hide_component("climate.button01"); - id(disp1).hide_component("climate.button02"); - id(disp1).show_component("climate.button03"); //Heat - id(disp1).hide_component("climate.button04"); - id(disp1).hide_component("climate.button05"); - id(disp1).hide_component("climate.button06"); - id(disp1).show_component("climate.button07"); //Off + id(disp1).hide_component("button01"); + id(disp1).hide_component("button02"); + id(disp1).show_component("button03"); //Heat + id(disp1).hide_component("button04"); //Cool + id(disp1).hide_component("button05"); + id(disp1).hide_component("button06"); + id(disp1).show_component("button07"); //Off // Set buttons colors id(disp1).set_component_font_color("climate.button01_icon", 10597); id(disp1).set_component_font_color("climate.button02_icon", 10597);