Files
N22/include/sensors/time_date.yaml
T
2026-03-25 21:06:57 +01:00

26 lines
838 B
YAML

- platform: template
sensors:
n22_dato:
friendly_name: "Dato"
value_template: >
{{ now().strftime('%A %d %B') | replace('Monday','Mandag')
| replace('Tuesday','Tirsdag')
| replace('Wednesday','Onsdag')
| replace('Thursday','Torsdag')
| replace('Friday','Fredag')
| replace('Saturday','Lørdag')
| replace('Sunday','Søndag') }}
n22_solopgang:
friendly_name: "Solopgang"
value_template: >
{% set t = state_attr('sun.sun','next_rising') %}
{{ as_timestamp(t) | timestamp_custom('%H:%M') if t else '-' }}
n22_solnedgang:
friendly_name: "Solnedgang"
value_template: >
{% set t = state_attr('sun.sun','next_setting') %}
{{ as_timestamp(t) | timestamp_custom('%H:%M') if t else '-' }}