Fix Variable invalid on buttons pages
This commit is contained in:
@@ -344,7 +344,7 @@ api:
|
||||
btn_icon: string
|
||||
btn_label: string
|
||||
btn_bri_txt: string
|
||||
btn_confirm: bool
|
||||
#btn_confirm: bool
|
||||
#entity: string
|
||||
then:
|
||||
- lambda: |-
|
||||
@@ -354,7 +354,7 @@ api:
|
||||
std::string btnicon = btn_id.c_str() + std::string("icon");
|
||||
std::string btntext = btn_id.c_str() + std::string("text");
|
||||
std::string btnbri = btn_id.c_str() + std::string("bri");
|
||||
std::string btnconf = btn_id.c_str() + std::string("conf");
|
||||
//std::string btnconf = btn_id.c_str() + std::string("conf");
|
||||
//std::string btnentity = btn_id.c_str() + std::string("entity");
|
||||
id(disp1).send_command_printf("%spic.pic=%i", btn_id.c_str(), btn_pic);
|
||||
id(set_component_color).execute(btnicon.c_str(), btn_icon_font, btn_bg);
|
||||
@@ -366,7 +366,7 @@ api:
|
||||
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(), " ");
|
||||
id(disp1).set_component_value(btnconf.c_str(), (btn_confirm) ? 1 : 0);
|
||||
//id(disp1).set_component_value(btnconf.c_str(), (btn_confirm) ? 1 : 0);
|
||||
//id(disp1).set_component_text_printf(btnentity.c_str(), "%s", entity.c_str());
|
||||
ESP_LOGD("service.set_button", "Finished");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user