Im really liking the ability to display a reminder of the days events, but have noticed that the response is not correctly sorted by time. Im using the following code:
- service: calendar.list_events
target:
entity_id: calendar.xxx_yyy
data:
duration:
hours: 24
response_variable: agenda
and get a response like this
2023-07-10T10:30:00-04:00: Item 2
2023-07-10T08:00:00-04:00: Item 1
2023-07-10T14:30:00-04:00: Item 4
2023-07-10T12:30:00-04:00: Item 3
Ideally, id like it to be sorted by time to look like this
2023-07-10T08:00:00-04:00: Item 1
2023-07-10T10:30:00-04:00: Item 2
2023-07-10T12:30:00-04:00: Item 3
2023-07-10T14:30:00-04:00: Item 4
I tried adding this line but it fails ( agenda.events|sort )
Your agenda for today: <p>
{% agenda.events|sort %}
{% for event in agenda.events %}
{{ as_timestamp(event.start)|timestamp_custom ('%Y/%m/%d %H:%M') }} - {{ event.summary }}<br>
{% endfor %}
</p>
Anyone have a solution??