Hi,
I already red in different post about my problem but I couldn’t find out what’s going on in my specific case.
What I want to do:
I have the duplicati integration installed and have two locations defined to make backups of my paperless folder. Now there are buttons for triggering a backup and I want to start the first backup and wait for it to finish without errors. After the first backup finished I want to start the second backup and do the same thing. There are two binary sensor for each backup instance ( operating state and backup state).
Now I created a script with a wait_for_trigger. I press the first button and then check for the operating state to change from “operating” to “idle” (aka on to off). I also added a timeout of 15 minutes.
Normally a backup will take a couple of minutes. However if I trigger this multiple times in a row, there is no change to be done by duplicati and the operating state will change from off to on and from on to off in a couple of seconds (but it always changes).
Now what I can see in the traces is that there is never a “trigger” and each wait_for_trigger block stuck in the “timeout” block. I dont understand why the trigger is not fired. Can anyone help? Sorry I set by Home Assistant to German language.
alias: Paperless-Sicherung
sequence:
- action: button.press
metadata: {}
data: {}
target:
entity_id: button.paperless_backup_backup_erstellen
- wait_for_trigger:
- entity_id:
- binary_sensor.paperless_backup_betriebszustand
to:
- "off"
trigger: state
from:
- "on"
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
continue_on_timeout: true
- if:
- condition: state
entity_id: binary_sensor.paperless_backup_status
state: "off"
then:
- action: button.press
metadata: {}
target:
entity_id: button.paperless_extern_backup_backup_erstellen
data: {}
- wait_for_trigger:
- entity_id: binary_sensor.paperless_extern_backup_betriebszustand
to: "off"
trigger: state
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
continue_on_timeout: true
- if:
- condition: state
entity_id: binary_sensor.paperless_extern_backup_status
state: "off"
then:
- action: notify.mobile_app_blackbird
metadata: {}
data:
message: Sicherung erfolgreich abgeschlossen!
title: Paperless
else:
- action: notify.mobile_app_blackbird
metadata: {}
data:
message: "Fehler bei Sicherung an Hetzner Cloud. Bitte prüfen! "
title: Paperless
else:
- action: notify.mobile_app_blackbird
metadata: {}
data:
message: Fehler bei lokaler Sicherung auf Mac Mini. Bitte prüfen!
title: Paperless
mode: restart


