Hello.
I’m looking for a solution on how I could create a code/sensor (if necessary) that would monitor the calendar entities.
The current code shows the next event for each calendar separately, which can be several months apart and within one calendar (say calendar f1) there can be multiple events within 7 days that are not shown!
The current code displays the next event for each calendar separately, which can be several months apart
Start at: {{ state_attr("calendar.prazniki_v_sloveniji","start_time")}} {{ state_attr("calendar.prazniki_v_sloveniji","message")}}
Start at: {{ state_attr("calendar.krscanski_prazniki","start_time")}} {{ state_attr("calendar.krscanski_prazniki","message")}}
Start at: {{ state_attr("calendar.pravoslavni_prazniki","start_time")}} {{ state_attr("calendar.pravoslavni_prazniki","message")}}
Start at: {{ state_attr("calendar.zodiac","start_time")}} {{ state_attr("calendar.zodiac","message")}}
Start at: {{ state_attr("calendar.f1","start_time")}} {{ state_attr("calendar.f1","message")}}
Start at: {{ state_attr("calendar.moto_gp","start_time")}} {{ state_attr("calendar.moto_gp","message")}}
Start at: {{ state_attr("calendar.odvoz_odpadkov","start_time")}} {{ state_attr("calendar.odvoz_odpadkov","message")}}
Start at: {{ state_attr("calendar.dom","start_time")}} {{ state_attr("calendar.dom","message")}}
Start at: {{ state_attr("calendar.robert","start_time")}} {{ state_attr("calendar.robert","message")}}
Let me first clarify that I have no programming knowledge and I understand yaml somewhat! I want to retrieve the data from the google calendar add-on in order of events, most recent first and for the next 7 days. As shown in the picture:
I would like to insert the obtained data into a floor plan card, where I use an SVG file for the entire display. I made an SVG file and named it a text element with an ID!
In the floor plan card I have:
- entities:
- task1
- task2
- task3
- task4
- task5
- task6
- task7
- task8
entity: ?
name: Temperatures
state_action:
- service: floorplan.text_set
service_data: ?
What to enter instead of the character?
Now there is a problem of how to display time (is it necessary to make a template sensor/binary_sensor and how) from the newest to the oldest within the next 7 days. Some calendars have the next event only in, say, two months, which I don’t want to see right now.