Ofcourse, if there are no tasks in this calendar, the message will be kinda useless.
Is there a way to check the amount of calendar.list_events return, to form an if statement?
Yes, you can check the number of events contained in the response variable with a count filter. Add the following to any If/Then, Choose, or standalone Condition action after your calendar.list_events action:
But I have another question.
In future ill completely remove my google calendar and switch to home assistant.
So ill have more calendars to check for events and give me a telegram message.
Is there a way to get only 1 telegram message for all calendars?
Lets say, ill run the code above twice. Telegram will send me 2 messages.
Is it possible to get this inside 1 message? So store the message in a variable or sth?
The Template Condition can be placed in line with the other actions. If the condition evaluates to true, the actions following it are executed, otherwise they are not.