alias: "TEST: Calendrier Vacances#2"
description: ""
triggers:
- trigger: calendar
entity_id: calendar.vacances
event: start
- trigger: state
entity_id: calendar.vacances
from: "off"
to: "on"
enabled: true
conditions: []
actions:
- action: notify.mobile_app_sm_s928w
data:
... etc ...
Your automation monitors calendar.vacances
using a Calendar Trigger and a State Trigger. Why?
I recommend you remove the State Trigger.
The templates in your action refer to various properties of the trigger
variable, like message
in trigger.to_state.attributes.message
, that do not exist when the State Trigger is triggered (or even the Calendar Trigger). That explains why you got an error message when the State Trigger was triggered.