Hi @Didgeridrew Thank you for trying to help me!
I did try to change the double quotes for single quotes but not tried your suggestion. I will try this right now.
EDIT:
This is the syntax which gave no errors:
service: notify.persistent_notification
data:
message: "note: {{state.attr(\"calendar.youtube\", \"description\") }} is starting"
The combination with single quotes and double quotes gave also an error…
Still have a lot to learn about yaml and templating …
To add to @123 's post… If you use significant offsets in your triggers or your calendar has concurrent/overlapping events, it is imperative that you use the trigger variable in your template as demonstrated to get the correct data.
Works. But i can not add Templates in message: in this Services test field…
If I am correct, the field Description in the Calendar corresponds with the field state: in the Automation?
Because you have used a colon (:) in your message, this is one of the cases where you do need to be careful with which multi-line quotation indicator is used…
Try the following version without a -:
action:
- service: notify.persistent_notification
data:
message: >
note: {{ trigger.calendar_event.description }} Event TestBert is
begonnen!
mode: single
So, I left out all special characters… But it does not give me a notification in the HA UI,
I did test the persistent notification with Developer Tools :: Services, and that works. Also notify.notify sends notifications to my iPhone.
I would love to have this working, so i can hopefully transform lots of node-RED automations with scheduler BigTimer to HA.
Ok, are you reloading the automation after you add/modify the calendar event? The calendar events are only re-read every 15 minutes or when the automation is reloaded…
Yes, every time a made a change in the automation, or added a new calendar event, i reload Automations via Developer Tools :: YAML
I just created 4 entries in my calendar and reloaded Automations:
OK, Thanks @123 I will create the same calendar Test and the TestEvent Hello World and your automation, and see what’s happening. Choose a time about 16:50 - 17:00.
Removed all other calendar events.
Ok, now i have a working situation. Have to find out wat went wrong in the first place.
And, thank you both @Didgeridrew and @123 for helping me so far.
I would recommend not using the calendar entity state, and instead looking at the contents of the trigger payload as the second example does in Calendar - Home Assistant
The reason is because the state example does not work if there are multiple calendar events firing at the same time or if there are overlaps and I worry about people copying these examples from the forums.
@allenporter Good that you mention this!
However, my problem with your link to the documentation is that it is not clear that this was also for the newlocal calendar. Because the richt side shows:
The Calendar entity was introduced in Home Assistant 0.33,
BTW, I would like to thank you and other developers for the local calendar. Hopefully the developments continue, fi the possibility to edit a calendar entry…