Hi everyone,
The Schedule helper attribute “next_event” gives you an output like this:
2023-01-23T18:30:00+01:00
I’ve created the following template sensor:
- name: prossimo_orario_cibo_gatti
state: "{{ state_attr('schedule.orario_cibo_gatti', 'next_event').time() }}"
icon: mdi:calendar
The output of this sensor is 18:30:00.
I would like to get 18:00 instead.
In short, how can I remove seconds? I’ve googled and read the documentation but I can’t figure this out.
On another note, I noticed that the output of this attribute is the next time there is a change of state.
I.e. next slot is at 18:30:00 for half an hour → up until 18:29 the output is 18:30:00, after that the output is 19:00:00.
I would like to catch only the start of the event. So, in my example, after 18:30 I would like to get the starting time of the next event, instead of the end time of the active event. Is this possible to get in some way?
I hope I explained myself
Thank you!