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

@@ -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