I have some issues when I try to call one script from another script several times, but with different parameters.
Here are my scripts:
snapshot_telegram:
alias: Snapshot Telegram
sequence:
- data_template:
entity_id: '{{ entity_id }}'
filename: /config/camera/{{ entity_id }}.jpeg
service: camera.snapshot
- delay: 00:00:01
- data_template:
file: /config/camera/{{ entity_id }}.jpeg
service: telegram_bot.send_photo
snapshot_telegram_test:
alias: snapshot_telegram_alle
sequence:
- data:
entity_id: camera.camera_vorhof
service: script.snapshot_telegram
- delay: 00:00:03
- data:
entity_id: camera.camera_garage
service: script.snapshot_telegram
- delay: 00:00:03
- data:
entity_id: camera.camera_terrasse
service: script.snapshot_telegram
snapshot_telegram_test_vorhof:
alias: snapshot_telegram_vorhof
sequence:
- data:
entity_id: camera.camera_vorhof
service: script.snapshot_telegram
snapshot_telegram_test_garage:
alias: snapshot_telegram_garage
sequence:
- data:
entity_id: camera.camera_garage
service: script.snapshot_telegram
snapshot_telegram_test_terasse:
alias: snapshot_telegram_terrasse
sequence:
- data:
entity_id: camera.camera_terrasse
service: script.snapshot_telegram
snapshot telegram works fine when I call it for only one camera.
so the last 3 scrips are working fine.
but the script snapshot_telegram_test
doesn’t work as it should.
The goal is to call the snapshot_telegram
for each camera, but only the first camera is processed, the second and third camera doesn’t even do a snapshot. I can see the datetime of the snapshots in the snapshot folder.
Maybe it is not possible to call a subscript several times?
Where is my error in thinking?