@@ -516,8 +516,8 @@ api:
|
||||
disp1->send_command_printf("%stext.picc=%u", id.c_str(), bg_pic);
|
||||
disp1->send_command_printf("%sicon.picc=%u", id.c_str(), bg_pic);
|
||||
disp1->send_command_printf("%sicon.font=%" PRIu32, id.c_str(), icon_font);
|
||||
disp1->send_command_printf("%sbri.pco=%u", id.c_str(), txt_color);
|
||||
disp1->send_command_printf("%stext.pco=%u", id.c_str(), txt_color);
|
||||
disp1->set_component_foreground_color(btnbri.c_str(), txt_color);
|
||||
disp1->set_component_foreground_color(btntext.c_str(), txt_color);
|
||||
set_component_color->execute(btnicon.c_str(), icon_color);
|
||||
disp1->set_component_text_printf(btnicon.c_str(), "%s", icon.c_str());
|
||||
display_wrapped_text->execute(btntext.c_str(), label.c_str(), 10);
|
||||
@@ -529,7 +529,6 @@ api:
|
||||
ESP_LOGW(TAG, "Skipping button `%s.%s` as page has changed to %s.", page.c_str(), id.c_str(), current_page->state.c_str());
|
||||
}
|
||||
|
||||
|
||||
##### SERVICE TO WAKE UP THE DISPLAY #####
|
||||
- service: wake_up
|
||||
variables:
|
||||
@@ -670,12 +669,12 @@ api:
|
||||
// on/off button
|
||||
if (supported_features & 128 and state == "off") //TURN_ON
|
||||
{
|
||||
disp1->set_component_color("bt_on_off", 65535);
|
||||
disp1->set_component_foreground_color("bt_on_off", 65535);
|
||||
disp1->show_component("bt_on_off");
|
||||
}
|
||||
else if (supported_features & 256 and state != "off") //TURN_OFF
|
||||
{
|
||||
disp1->set_component_color("bt_on_off", 10597);
|
||||
disp1->set_component_foreground_color("bt_on_off", 10597);
|
||||
disp1->show_component("bt_on_off");
|
||||
}
|
||||
else disp1->hide_component("bt_on_off");
|
||||
|
||||
Reference in New Issue
Block a user