Fix date format on home page (#602)
* Fix date format on home page To use custom date format * Remove debug call
This commit is contained in:
@@ -128,10 +128,10 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
|
||||
value: '%d.%m'
|
||||
- label: 'DD/MM (ex. 22/03)'
|
||||
value: '%d/%m'
|
||||
- label: 'M/D (ex. 3/22)'
|
||||
value: '%-m/%-d'
|
||||
- label: 'D/M (ex. 22/3)'
|
||||
value: '%-d/%-m'
|
||||
- label: 'M/D (ex. 3/22)'
|
||||
value: '%-m/%-d'
|
||||
|
||||
time_format:
|
||||
name: Time Format
|
||||
@@ -3796,6 +3796,9 @@ action:
|
||||
entity: 'unknown'
|
||||
##### NSPanel Date #####
|
||||
### DATE Font Color ###
|
||||
- &variables-date_format
|
||||
variables:
|
||||
date_format: !input "date_format"
|
||||
- *delay-default
|
||||
- service: "{{ nextion.commands.font_color }}"
|
||||
data:
|
||||
@@ -3806,8 +3809,7 @@ action:
|
||||
- service: "{{ nextion.commands.text_printf }}"
|
||||
data:
|
||||
component: home.date
|
||||
message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom('%d.%m') }}"
|
||||
|
||||
message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom(date_format) }}"
|
||||
##### NSPanel Time #####
|
||||
### TIME Font Color ###
|
||||
- *delay-default
|
||||
@@ -4825,8 +4827,7 @@ action:
|
||||
- *delay-default
|
||||
|
||||
##### Display date (long) #####
|
||||
- variables:
|
||||
date_format: !input "date_format"
|
||||
- *variables-date_format
|
||||
- service: "{{ nextion.commands.text_printf }}"
|
||||
data:
|
||||
component: "{{ page_name }}.date"
|
||||
|
||||
Reference in New Issue
Block a user