Display time on screensaver page

Solves #1065
Solves #1439
This commit is contained in:
Edward Firmo
2023-12-20 09:48:10 +01:00
parent fd0edd28f6
commit cfa16bc8e2
3 changed files with 175 additions and 106 deletions

View File

@@ -79,6 +79,7 @@ wifi:
12. Enhanced control for automation entities on buttons
13. Dual thermostat controller support (add-on)
14. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings
15. Display time on the `screensaver` page
 
## Details of noteworthy changes
@@ -186,6 +187,12 @@ This feature enhances the capabilities of the NSPanel without compromising its e
### 14. Enhanced timeout flexibility for Sleep, Page fallback, and Dimming settings
We have improved the functionality of our system by enhancing the timeout flexibility for Sleep, Page Fallback, and Dimming settings. The previous timeout limit of 300 seconds has been significantly expanded, offering users more control and customization options for these specific features. This enhancement allows for a wider range of use cases, catering to the needs of those who require extended periods for these settings, while still maintaining the option for shorter durations.
 
### 15. Display time on the `screensaver` page
In this release, we're excited to introduce a new feature that adds a display time function to the Screensaver page. With this update, our screensaver not only serves its primary purpose of saving screen energy but also doubles as an informative display, reflecting our commitment to creating practical, user-friendly solutions.
You can enable this feature on the bueprint settings, at the **CUSTOM CONFIGURATION** section (almost at the end). You also have to set **Display Brightness Sleep** at the device's page (**Settings** > **Devices & Services** > **ESPHome**).
 
## What's Next?
Discover what's next and what we are working on right now in our [Milestones](https://github.com/Blackymas/NSPanel_HA_Blueprint/milestones?direction=asc&sort=due_date)

View File

@@ -311,6 +311,8 @@ api:
embedded_indoor_temperature: bool
temperature_unit_is_fahrenheit: bool
mui_please_confirm: string
screensaver_time: bool
screensaver_time_color: int[]
then:
- script.execute:
id: global_settings
@@ -328,6 +330,8 @@ api:
embedded_indoor_temperature: !lambda "return embedded_indoor_temperature;"
temperature_unit_is_fahrenheit: !lambda "return temperature_unit_is_fahrenheit;"
mui_please_confirm: !lambda "return mui_please_confirm;"
screensaver_time: !lambda "return screensaver_time;"
screensaver_time_color: !lambda "return screensaver_time_color;"
##### Service to show a notification-message on the screen #####
- service: notification_show
@@ -834,6 +838,16 @@ globals:
type: std::vector<int32_t>
restore_value: false
##### Screensaver #####
- id: screensaver_display_time
type: bool
restore_value: false
initial_value: 'false'
- id: screensaver_display_time_color
type: std::vector<int32_t>
restore_value: false
initial_value: '{64, 64, 64}'
##### Versions #####
- id: version_blueprint
type: std::string
@@ -1024,6 +1038,7 @@ number:
unit_of_measurement: '%'
min_value: 1
max_value: 100
initial_value: 100
step: 1
restore_value: true
optimistic: true
@@ -1049,6 +1064,7 @@ number:
unit_of_measurement: '%'
min_value: 1
max_value: 100
initial_value: 25
step: 1
restore_value: true
optimistic: true
@@ -1065,15 +1081,34 @@ number:
if (current_page->state == "settings") disp1->set_component_text_printf("dim_text", "%i%%", int(x));
}
##### SCREEN BRIGHTNESS SLEEP #####
- name: ${device_name} Display Brightness Sleep
id: display_sleep_brightness
platform: template
entity_category: config
unit_of_measurement: '%'
min_value: 0
max_value: 100
initial_value: 0
step: 1
restore_value: true
optimistic: true
set_action:
then:
- lambda: |-
id(display_dim_brightness_global) = int(x);
disp1->send_command_printf("brightness_sleep=%i", int(x));
if (current_page->state == "screensaver") set_brightness->execute(x);
##### Temperature Correction #####
- name: ${device_name} Temperature Correction
platform: template
id: temperature_correction
entity_category: config
unit_of_measurement: ${temp_units}
initial_value: 0
min_value: -10
max_value: 10
initial_value: 0
step: 0.1
mode: box
restore_value: true
@@ -1592,6 +1627,7 @@ script:
disp1->send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
disp1->send_command_printf("brightness_dim=%i", id(display_dim_brightness_global));
disp1->send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
disp1->send_command_printf("brightness_sleep=%i", int(display_sleep_brightness->state));
set_brightness->execute(id(display_brightness_global));
ESP_LOGD(TAG, "Report to Home Assistant");
nextion_init->publish_state(true);
@@ -1759,6 +1795,8 @@ script:
embedded_indoor_temperature: bool
temperature_unit_is_fahrenheit: bool
mui_please_confirm: string
screensaver_time: bool
screensaver_time_color: int[]
then:
- lambda: |-
static const char *const TAG = "script.global_settings";
@@ -1796,6 +1834,11 @@ script:
ESP_LOGV(TAG, "Setup confirm page");
display_wrapped_text->execute("confirm.title", mui_please_confirm.c_str(), 15);
// Screen saver page (sleep)
ESP_LOGV(TAG, "Setup screensaver page");
id(screensaver_display_time) = screensaver_time;
id(screensaver_display_time_color) = screensaver_time_color;
// Update home page
ESP_LOGV(TAG, "Update home page");
page_home->execute();
@@ -2170,6 +2213,7 @@ script:
then:
- lambda: |-
set_page_id->execute("back_page_id", wakeup_page_name->state.c_str());
set_component_color->execute("screensaver.text",id(screensaver_display_time_color));
- id: page_settings
mode: restart
@@ -2222,44 +2266,30 @@ script:
then:
- lambda: |-
std::string time_format_str = id(mui_time_format);
if (time_format_str.find("%p") != std::string::npos)
{
if (time_format_str.find("%-H") != std::string::npos) {
time_format_str = time_format_str.replace(time_format_str.find("%-H"), sizeof("%-H")-1,
to_string((int)(id(time_provider).now().hour)));
}
if (time_format_str.find("%-I") != std::string::npos) {
if (id(time_provider).now().hour>12) {
time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1,
to_string((int)(id(time_provider).now().hour-12)));
} else if (id(time_provider).now().hour==0) {
time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1, "12");
} else {
time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1,
to_string((int)(id(time_provider).now().hour)));
}
}
if (current_page->state == "screensaver" and id(screensaver_display_time)) {
std::string time_format_str_sleep = time_format_str.replace(time_format_str.find("%p"), sizeof("%p")-1,
(id(time_provider).now().hour<12) ? id(mui_meridiem)[0] : id(mui_meridiem)[1]);
disp1->set_component_text_printf("screensaver.text", "%s", id(time_provider).now().strftime(time_format_str_sleep).c_str());
} else if (time_format_str.find("%p") != std::string::npos) {
std::string meridiem_text = (id(time_provider).now().hour<12) ? id(mui_meridiem)[0] : id(mui_meridiem)[1];
disp1->set_component_text_printf("home.meridiem", "%s", meridiem_text.c_str());
}
else { disp1->set_component_text_printf("home.meridiem", " "); }
if (time_format_str.find("%-H") != std::string::npos) {
time_format_str = time_format_str.replace(time_format_str.find("%-H"),
sizeof("%-H")-1,
to_string((int)(id(time_provider).now().hour))
);
}
if (time_format_str.find("%-I") != std::string::npos)
{
if (id(time_provider).now().hour>12)
{
time_format_str = time_format_str.replace(time_format_str.find("%-I"),
sizeof("%-I")-1,
to_string((int)(id(time_provider).now().hour-12))
);
}
else if (id(time_provider).now().hour==0)
{
time_format_str = time_format_str.replace(time_format_str.find("%-I"),
sizeof("%-I")-1,
"12"
);
}
else
{
time_format_str = time_format_str.replace(time_format_str.find("%-I"),
sizeof("%-I")-1,
to_string((int)(id(time_provider).now().hour))
);
}
}
std::string time_text = id(time_provider).now().strftime(time_format_str);
disp1->set_component_text_printf("home.time", "%s", time_text.c_str());
} else disp1->set_component_text_printf("home.meridiem", " ");
disp1->set_component_text_printf("home.time", "%s", id(time_provider).now().strftime(time_format_str).c_str());
- id: refresh_relays
mode: restart

View File

@@ -175,7 +175,7 @@ blueprint:
*Label color which should be displayed*
default: [255, 255, 255] # 65535 White
selector: &color-selector
selector: &color_selector
color_rgb:
home_outdoor_temp_font:
name: Outdoor Temperature Sensor font size
@@ -231,7 +231,7 @@ blueprint:
*Icon color which should be displayed*
default: [255, 255, 255] # 65535 White
selector: *color-selector
selector: *color_selector
home_indoor_temp_label_color:
name: Indoor Temperature Sensor - LABEL COLOR (Optional)
description: >
@@ -239,7 +239,7 @@ blueprint:
*Label color which should be displayed*
default: [255, 255, 255] # 65535 White
selector: *color-selector
selector: *color_selector
##### Sensors - Page Home #####
##### PLACEHOLDER ######################################################################
placeholder02:
@@ -276,7 +276,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_value01_label_color:
name: Sensor 01 - LABEL COLOR (Optional)
description: >
@@ -284,7 +284,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_value02:
name: Sensor 02 - ENTITY (Optional)
description: >
@@ -309,7 +309,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_value02_label_color:
name: Sensor 02 - LABEL COLOR (Optional)
description: >
@@ -317,7 +317,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_value03:
name: Sensor 03 - ENTITY (Optional)
description: >
@@ -342,7 +342,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_value03_label_color:
name: Sensor 03 - LABEL COLOR (Optional)
description: >
@@ -350,7 +350,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
##### Chips - Page Home #####
##### PLACEHOLDER ######################################################################
placeholder03:
@@ -417,7 +417,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip02:
name: Chip 02 - ENTITY (Optional)
description: >
@@ -450,7 +450,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip03:
name: Chip 03 - ENTITY (Optional)
description: >
@@ -483,7 +483,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip04:
name: Chip 04 - ENTITY (Optional)
description: >
@@ -516,7 +516,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip05:
name: Chip 05 - ENTITY (Optional)
description: >
@@ -549,7 +549,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip06:
name: Chip 06 - ENTITY (Optional)
description: >
@@ -582,7 +582,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
chip07:
name: Chip 07 - ENTITY (Optional)
description: >
@@ -615,7 +615,7 @@ blueprint:
*Icon color which should be displayed*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
## Custom buttons - Page Home
##### PLACEHOLDER ######################################################################
placeholder18:
@@ -846,7 +846,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
climate_button08_hold_custom_action:
name: Custom button 01 - Hold action (Optional)
description: >
@@ -881,7 +881,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
climate_button09_hold_custom_action:
name: Custom button 02 - Hold action (Optional)
description: >
@@ -918,7 +918,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
climate_value01_label_color:
name: Sensor 01 - LABEL COLOR (Optional)
description: >
@@ -926,7 +926,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
## Climate page - Sensor 02
climate_value02:
name: Sensor 02 - ENTITY (Optional)
@@ -952,7 +952,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
climate_value02_label_color:
name: Sensor 02 - LABEL COLOR (Optional)
description: >
@@ -960,7 +960,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
## Climate page - Sensor 03
climate_value03:
name: Sensor 03 - ENTITY (Optional)
@@ -986,7 +986,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
climate_value03_label_color:
name: Sensor 03 - LABEL COLOR (Optional)
description: >
@@ -994,7 +994,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
## Climate page - Sensor 04
climate_value04:
name: Sensor 04 - ENTITY (Optional)
@@ -1020,7 +1020,7 @@ blueprint:
*Icon color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
climate_value04_label_color:
name: Sensor 04 - LABEL COLOR (Optional)
description: >
@@ -1028,7 +1028,7 @@ blueprint:
*Label color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
##### QR Code - Page Home/QR Code #####
##### PLACEHOLDER ######################################################################
@@ -1080,7 +1080,7 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
##### Page Home - Hardware Buttons #####
##### PLACEHOLDER ######################################################################
@@ -1165,7 +1165,7 @@ blueprint:
*LABEL color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
relay_2_local_fallback:
name: Activate relay 2 local fallback - TRUE/FALSE (Optional)
default: false
@@ -1220,7 +1220,7 @@ blueprint:
*LABEL color which should be displayed*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
##### Button pages #####
##### Button pages - Config #####
@@ -1318,7 +1318,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity01_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1361,7 +1361,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity02_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1404,7 +1404,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity03_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1447,7 +1447,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity04_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1490,7 +1490,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity05_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1533,7 +1533,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity06_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1576,7 +1576,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity07_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1619,7 +1619,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity08_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1679,7 +1679,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity09_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1722,7 +1722,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity10_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1765,7 +1765,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity11_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1808,7 +1808,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity12_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1851,7 +1851,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity13_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1894,7 +1894,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity14_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1937,7 +1937,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity15_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -1980,7 +1980,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity16_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2040,7 +2040,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity17_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2083,7 +2083,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity18_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2126,7 +2126,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity19_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2169,7 +2169,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity20_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2212,7 +2212,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity21_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2255,7 +2255,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity22_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2298,7 +2298,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity23_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2341,7 +2341,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity24_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2401,7 +2401,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity25_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2444,7 +2444,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity26_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2487,7 +2487,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity27_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2530,7 +2530,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity28_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2573,7 +2573,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity29_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2616,7 +2616,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity30_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2659,7 +2659,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity31_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2702,7 +2702,7 @@ blueprint:
*Icon color which should be displayed when button is on*
default: [0, 128, 248] # 1055 Blue
selector: *color-selector
selector: *color_selector
entity32_confirm:
name: Confirm execution of the button press - TRUE/FALSE (Optional)
default: false
@@ -2746,7 +2746,7 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
entitypages_value_alignment:
name: Value column alignment
description: >
@@ -3704,6 +3704,7 @@ blueprint:
default: ' '
selector: *placeholder-selector
##### PLACEHOLDER ######################################################################
##### Notifications button ######
home_button04_icon:
name: Notification - ICON (Optional)
description: >
@@ -3719,7 +3720,7 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [200, 204, 200] # 52857 Grey super light
selector: *color-selector
selector: *color_selector
home_button04_icon_color02:
name: Notification unread - ICON COLOR (Optional)
description: >
@@ -3727,7 +3728,8 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [248, 0, 0] # 63488 Red
selector: *color-selector
selector: *color_selector
##### Relay 1 Chip ######
relay01_icon:
name: Relay 01 - ICON (Optional)
description: >
@@ -3743,7 +3745,8 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
##### Relay 2 Chip ######
relay02_icon:
name: Relay 02 - ICON (Optional)
description: >
@@ -3759,7 +3762,8 @@ blueprint:
*Icon color which should be displayed (default color is set)*
default: [128, 128, 128] # 33808 Grey light
selector: *color-selector
selector: *color_selector
##### Time label ######
time_label_color:
name: Time - LABEL COLOR (Optional)
description: >
@@ -3767,7 +3771,8 @@ blueprint:
*Label color which should be displayed (default color is set)*
default: [255, 255, 255] # 65535 White
selector: *color-selector
selector: *color_selector
##### Date label ######
date_label_color:
name: Date - LABEL COLOR (Optional)
description: >
@@ -3775,7 +3780,25 @@ blueprint:
*Label color which should be displayed (default color is set)*
default: [255, 255, 255] # 65535 White
selector: *color-selector
selector: *color_selector
##### Screensaver #####
screensaver_display_time:
name: Screen saver - Display time
description: >
*SCREENSAVER page*
*Enable the display of time while sleeping (screensaver).*
default: false
selector:
boolean:
screensaver_display_time_font_color:
name: Screen saver - Display time font
description: >
*SCREENSAVER page*
*Font color to be used when displaying the time while sleeping (screensaver).*
default: [64, 64, 64]
selector: *color_selector
##### Advanced settings #####
##### PLACEHOLDER ######################################################################
@@ -3785,8 +3808,7 @@ blueprint:
default: ' '
selector: *placeholder-selector
##### PLACEHOLDER ######################################################################
###### Special settings ################################################################
##### TFT Folder #####
tft_path:
name: Nextion TFT File Folder (Optional)
description: >
@@ -3802,6 +3824,7 @@ blueprint:
default: []
selector:
text: {}
##### Show while loading #####
show_while_loading:
name: Show pages while loading?
description: >
@@ -3814,6 +3837,7 @@ blueprint:
default: false
selector:
boolean:
##### Media player update #####
media_player_update_interval:
name: Media player - Update interval
description: >
@@ -3834,6 +3858,7 @@ blueprint:
min: 0
max: 5000
unit_of_measurement: milliseconds
##### Automation's action #####
domain_automation_button_action:
name: Button action for automation entities
description: >
@@ -7202,6 +7227,11 @@ action:
format: !input 'time_format'
color_rgb: !input 'time_label_color'
- &variables-screensaver
variables:
screensaver_display_time: !input screensaver_display_time
screensaver_display_time_font_color: !input screensaver_display_time_font_color
- service: '{{ nextion.command.page_home }}'
data:
date_color: >
@@ -7353,6 +7383,8 @@ action:
embedded_indoor_temperature: '{{ embedded_indoor_temperature }}'
temperature_unit_is_fahrenheit: '{{ state_attr((nspaneltemp if embedded_indoor_temperature else indoor_temperature_sensor), "unit_of_measurement") | default("") in ["°F", "F"]}}'
mui_please_confirm: '{{ mui[language].please_confirm }}'
screensaver_time: '{{ screensaver_display_time if screensaver_display_time is bool else false }}'
screensaver_time_color: '{{ screensaver_display_time_font_color if screensaver_display_time_font_color is sequence other [64, 64, 64] }}'
continue_on_error: true
- *delay-default