Skip to content

Commit

Permalink
Fix screensaver_display_time_format when no user input
Browse files Browse the repository at this point in the history
Solves #2391
  • Loading branch information
edwardtfn committed Nov 23, 2024
1 parent 1bd1fe4 commit 03f412a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nspanel_blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9782,12 +9782,25 @@ actions:

- alias: Set the format to display time on screensaver
sequence:
- variables:
screensaver_display_time_format: !input screensaver_display_time_format
time_format: !input time_format
- *delay_default
- alias: screensaver_display_time_format
action: 'esphome.{{ nspanel_name }}_set_string'
data:
component: screensaver_display_time_format
val: !input screensaver_display_time_format
val: >
{{
screensaver_display_time_format
if
screensaver_display_time_format is defined and
screensaver_display_time_format is string and
screensaver_display_time_format | length > 0 and
screensaver_display_time_format != "same"
else
time_format
}}
continue_on_error: true

- alias: Set the font to display time on screensaver
Expand Down

0 comments on commit 03f412a

Please sign in to comment.