Hi !
I’m just trying to receive a notification after an automatic backup, to tell me if the backup succeed or failed.
This yaml code doesn’t work, I don’t receive anything after the backup
- alias: Notif Daily Backup
description: "Envoi une notification de l'etat de la sauvegarde quotidienne une fois exécutée"
trigger:
- platform: event
event_type: auto_backup.backup_failed
- platform: event
event_type: auto_backup.backup_successful
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.event_type == 'auto_backup.backup_failed' }}"
sequence:
- service: notify.mobile_app_oeplusw4
data:
message: "La sauvegarde a échoué"
- conditions:
- condition: template
value_template: "{{ trigger.event.event_type == 'auto_backup.backup_succeed' }}"
sequence:
- service: notify.mobile_app_oeplusw4
data:
message: "La sauvegarde s'est bien déroulée"
mode: single
As debugging, If I put a notify service action out of conditions like this :
- alias: Notif Daily Backup
description: "Envoi une notification de l'etat de la sauvegarde quotidienne une fois exécutée"
trigger:
- platform: event
event_type: auto_backup.backup_failed
- platform: event
event_type: auto_backup.backup_successful
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.event_type == 'auto_backup.backup_failed' }}"
sequence:
- service: notify.mobile_app_oeplusw4
data:
message: "La sauvegarde a échoué"
- conditions:
- condition: template
value_template: "{{ trigger.event.event_type == 'auto_backup.backup_succeed' }}"
sequence:
- service: notify.mobile_app_oeplusw4
data:
message: "La sauvegarde s'est bien déroulée"
- service: notify.mobile_app_oeplusw4
data:
message: "La sauvegarde s'est déroulée"
mode: single
I receive “La sauvegarde s’est déroulée” message wich means that one of the triggers event_type (auto_backup.backup_successful or auto_backup.backup_failed) really triggered.
So I don’t understand why the automation workflow doesn’t go in one of the conditions… Some ideas ?