Move script.refresh_colors to service.global_settings
As this is called from a single point, there's no meaning of having a separated script.
This commit is contained in:
@@ -447,7 +447,10 @@ api:
|
|||||||
|
|
||||||
// Refresh colors of global components
|
// Refresh colors of global components
|
||||||
ESP_LOGV("service.global_settings", "Refresh colors of global components");
|
ESP_LOGV("service.global_settings", "Refresh colors of global components");
|
||||||
id(refresh_colors).execute();
|
id(disp1).set_component_font_color("home.date", id(home_date_color));
|
||||||
|
id(disp1).set_component_font_color("home.time", id(home_time_color));
|
||||||
|
id(disp1).set_component_font_color("home.icon_top_01", id(home_relay1_icon_color));
|
||||||
|
id(disp1).set_component_font_color("home.icon_top_02", id(home_relay2_icon_color));
|
||||||
|
|
||||||
// Update home page
|
// Update home page
|
||||||
ESP_LOGV("service.global_settings", "Update home page");
|
ESP_LOGV("service.global_settings", "Update home page");
|
||||||
@@ -1477,15 +1480,6 @@ script:
|
|||||||
id(disp1).set_component_value("embedded", (embedded_climate) ? 1 : 0);
|
id(disp1).set_component_value("embedded", (embedded_climate) ? 1 : 0);
|
||||||
- lambda: ESP_LOGV("script.set_climate", "Finished");
|
- lambda: ESP_LOGV("script.set_climate", "Finished");
|
||||||
|
|
||||||
- id: refresh_colors ## Refresh colors of global components
|
|
||||||
mode: restart
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
id(disp1).set_component_font_color("home.date", id(home_date_color));
|
|
||||||
id(disp1).set_component_font_color("home.time", id(home_time_color));
|
|
||||||
id(disp1).set_component_font_color("home.icon_top_01", id(home_relay1_icon_color));
|
|
||||||
id(disp1).set_component_font_color("home.icon_top_02", id(home_relay2_icon_color));
|
|
||||||
|
|
||||||
- id: refresh_datetime
|
- id: refresh_datetime
|
||||||
mode: restart
|
mode: restart
|
||||||
then:
|
then:
|
||||||
|
|||||||
Reference in New Issue
Block a user