diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 30f3460..9e1a296 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -331,12 +331,12 @@ api: id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font); id(disp1).set_component_text_printf(btnicon.c_str(), "%s", btn_icon.c_str()); id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str()); - id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str()); - // if (strcmp(btn_bri_txt.c_str(), "0") != 0) { - // id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str()); - // } else { - // id(disp1).set_component_text_printf(btnbri.c_str(), "%s", std::string(" ")); - // } + // id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str()); + if (strcmp(btn_bri_txt.c_str(), "0") != 0) { + id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str()); + } else { + id(disp1).set_component_text_printf(btnbri.c_str(), " "); + } ##### START - GLOBALS CONFIGURATION ##### globals: