Hello all,
I have created some sensors in my sensor.yaml and I call this in my ui-lovelace.yaml:
- entity: sensor.time
hold_action:
action: none
style:
color: 'rgba(255, 255, 255, 0.7)'
font-size: 5.41vw
font-weight: 200
left: 2.7%
letter-spacing: '-0.05vw'
max-width: 1px
top: 10%
tap_action:
action: none
type: state-label
- entity: sensor.date_string
hold_action:
action: none
style:
color: 'rgba(255, 255, 255, 0.3)'
font-size: 1.3vw
font-weight: 300
left: 17.5%
letter-spacing: '-0.05vw'
text-align: left
top: 17%
width: 30%
tap_action:
action: none
type: state-label
Below the sensors:
- platform: template
sensors:
dayoftheweek:
entity_id: sensor.date
value_template: "{{ now().strftime('%A') }}"
month:
entity_id: sensor.date
value_template: "{{ now().strftime('%B') }}"
dateofthemonth:
entity_id: sensor.date
value_template: >
{% set suffix = ['st', 'nd', 'rd'] %}
{% set day = now().day %}
{% set index = 3 if day // 10 == 1 or day % 10 == 0 else (day % 10) - 1 %}
{{ day~'th' if index > 2 else day~suffix[index] }}
## Converts time and date into sentence for UI
date_string:
friendly_name: "Full Date"
value_template: "{{ states('sensor.dayoftheweek') }}, {{ states('sensor.dateofthemonth') }} of {{ states('sensor.month') }} {{ now().year }}"
Which looks great and exactly how I want it to look, but now for some strange reason my first main Lovelace view won’t auto-refresh.
Time stands still and other elements don’t update. When I hit refresh in my browser the entities show correct values and the time jumps to the correct time, but only for that moment. All updates in that page fail then to show again until the next manual refresh.
All other Lovelace pages work fine (same date/time formats and sidebar settings used).
Any idea someone?