Rebuild calls to outdoor temperature updates

Improves #1802
This commit is contained in:
Edward Firmo
2024-02-19 19:21:37 +01:00
parent ed0b739821
commit 7480aab072
2 changed files with 17 additions and 14 deletions

View File

@@ -590,6 +590,7 @@ api:
entities_pages: bool
entities_pages_icon: string
entities_pages_icon_color: int[]
outdoor_temp_font: int
then:
- lambda: |-
if (not id(is_uploading_tft)) {
@@ -609,6 +610,7 @@ api:
ESP_LOGV(TAG, "entities_pages: %s", YESNO(entities_pages));
ESP_LOGV(TAG, "entities_pages_icon: %s", entities_pages_icon.c_str());
ESP_LOGV(TAG, "entities_pages_icon_color: %i", entities_pages_icon_color.size());
ESP_LOGV(TAG, "outdoor_temp_font: %i", outdoor_temp_font);
// Localization
ESP_LOGV(TAG, "Load localization");
@@ -640,6 +642,10 @@ api:
disp1->send_command_printf("home.bt_qrcode.font=%i", id(home_custom_buttons_font_id));
disp1->send_command_printf("home.bt_entities.font=%i", id(home_custom_buttons_font_id));
// Outdoor temperature font size
ESP_LOGV(TAG, "Outdoor temperature font size");
disp1->send_command_printf("home.outdoor_temp.font==%i", outdoor_temp_font);
// Notification button
ESP_LOGV(TAG, "Set Notification button");
disp1->send_command_printf("is_notification=%i", (notification_text->state.empty() and notification_label->state.empty()) ? 0 : 1);