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'
|
value: '%d.%m'
|
||||||
- label: 'DD/MM (ex. 22/03)'
|
- label: 'DD/MM (ex. 22/03)'
|
||||||
value: '%d/%m'
|
value: '%d/%m'
|
||||||
- label: 'M/D (ex. 3/22)'
|
- label: 'D/M (ex. 22/3)'
|
||||||
value: '%-m/%-d'
|
|
||||||
- label: 'D/M (ex. 22/3)'
|
|
||||||
value: '%-d/%-m'
|
value: '%-d/%-m'
|
||||||
|
- label: 'M/D (ex. 3/22)'
|
||||||
|
value: '%-m/%-d'
|
||||||
|
|
||||||
time_format:
|
time_format:
|
||||||
name: Time Format
|
name: Time Format
|
||||||
@@ -3796,6 +3796,9 @@ action:
|
|||||||
entity: 'unknown'
|
entity: 'unknown'
|
||||||
##### NSPanel Date #####
|
##### NSPanel Date #####
|
||||||
### DATE Font Color ###
|
### DATE Font Color ###
|
||||||
|
- &variables-date_format
|
||||||
|
variables:
|
||||||
|
date_format: !input "date_format"
|
||||||
- *delay-default
|
- *delay-default
|
||||||
- service: "{{ nextion.commands.font_color }}"
|
- service: "{{ nextion.commands.font_color }}"
|
||||||
data:
|
data:
|
||||||
@@ -3806,8 +3809,7 @@ action:
|
|||||||
- service: "{{ nextion.commands.text_printf }}"
|
- service: "{{ nextion.commands.text_printf }}"
|
||||||
data:
|
data:
|
||||||
component: home.date
|
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 #####
|
##### NSPanel Time #####
|
||||||
### TIME Font Color ###
|
### TIME Font Color ###
|
||||||
- *delay-default
|
- *delay-default
|
||||||
@@ -4825,8 +4827,7 @@ action:
|
|||||||
- *delay-default
|
- *delay-default
|
||||||
|
|
||||||
##### Display date (long) #####
|
##### Display date (long) #####
|
||||||
- variables:
|
- *variables-date_format
|
||||||
date_format: !input "date_format"
|
|
||||||
- service: "{{ nextion.commands.text_printf }}"
|
- service: "{{ nextion.commands.text_printf }}"
|
||||||
data:
|
data:
|
||||||
component: "{{ page_name }}.date"
|
component: "{{ page_name }}.date"
|
||||||
|
|||||||
Reference in New Issue
Block a user