Fix constructor of Entity pages
This commit is contained in:
@@ -395,15 +395,18 @@ api:
|
||||
ent_value_xcen: string
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGV("service.set_entity", "entity: %s", ent_id.c_str());
|
||||
ESP_LOGD("service.set_entity", "entity: %s", ent_id.c_str());
|
||||
std::string enticon = ent_id.c_str() + std::string("_pic");
|
||||
std::string entlabel = ent_id.c_str() + std::string("_label");
|
||||
std::string entxcen = ent_id.c_str() + std::string(".xcen=") + ent_value_xcen.c_str();
|
||||
id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str());
|
||||
ESP_LOGD("service.set_entity", "%s: %s", enticon.c_str(), ent_id.c_str());
|
||||
if (strcmp(ent_icon.c_str(), "0") != 0) id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str());
|
||||
id(disp1).set_component_text_printf(entlabel.c_str(), "%s", ent_label.c_str());
|
||||
ESP_LOGD("service.set_entity", "%s: %s", entlabel.c_str(), ent_label.c_str());
|
||||
//id(display_wrapped_text).execute(entlabel.c_str(), ent_label.c_str(), id(display_mode) == 2 ? 16 : 20);
|
||||
id(disp1).set_component_text_printf(ent_id.c_str(), "%s", ent_value.c_str());
|
||||
ESP_LOGD("service.set_entity", "%s: %s", ent_id.c_str(), ent_value.c_str());
|
||||
if (strcmp(ent_value_xcen.c_str(), "0") != 0) id(disp1).send_command_printf("%s", entxcen.c_str());
|
||||
|
||||
##### Service for transferring global settings from the blueprint to ESPHome #####
|
||||
|
||||
Reference in New Issue
Block a user