Fix names on button pages
Fix names when a name is not provided in the blueprint settings.
This commit is contained in:
@@ -347,7 +347,9 @@ api:
|
||||
#entity: string
|
||||
then:
|
||||
- lambda: |-
|
||||
// ESP_LOGV("nextion", "set button %s", btn_id.c_str());
|
||||
ESP_LOGD("service.set_button", "Starting");
|
||||
ESP_LOGD("service.set_button", "btn_id: %s", btn_id.c_str());
|
||||
ESP_LOGD("service.set_button", "btn_label: %s", btn_label.c_str());
|
||||
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");
|
||||
@@ -365,6 +367,7 @@ api:
|
||||
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_text_printf(btnentity.c_str(), "%s", entity.c_str());
|
||||
ESP_LOGD("service.set_button", "Finished");
|
||||
|
||||
##### SERVICE TO WAKE UP THE DISPLAY #####
|
||||
- service: wake_up
|
||||
|
||||
Reference in New Issue
Block a user