Thanks @robmarkcole, will do.
Have another question about my automation script.
The notify telegram will send the picture with a timestamp but does not include the message element.
Wondering if any of the more experienced users can spot an issue with it?
Have checked the docs and other notify examples and I believe I have it correct.
- id: facebox_announcement
alias: 'Facebox Announcement'
initial_state: on
trigger:
platform: event
event_type: doorbird_gate_motion
action:
- delay: 00:00:02
- service: camera.snapshot
data:
entity_id: camera.gate_live
filename: '/config/www/facebox/tmp/image.jpg'
- delay: 00:00:01
- service: image_processing.scan
entity_id: image_processing.facebox_saved_image
- delay: 00:00:02
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_echo_dot
volume_level: 0.9
- service_template: '{% if states.sensor.facebox_detection.state != "unknown" %} media_player.alexa_tts {% endif %}'
data_template:
entity_id: media_player.kitchen_echo_dot
message: '{% if states.sensor.facebox_detection.state != "unknown" %} {{ states("sensor.facebox_detection") }} is at the door {% else %} {% endif %}'
- service: notify.telegram
data:
message: '{% if states.sensor.facebox_detection.state != "unknown" %} Facebox triggered. {{ states("sensor.facebox_detection") }} is at the door {% else %} Facebox triggered. {% endif %}'
data:
photo:
file: '/config/www/facebox/tmp/image.jpg'
caption: '{{now().strftime("%d.%m.%Y-%H:%M:%S")}}'
- service: media_player.volume_set
data:
entity_id: media_player.kitchen_echo_dot
volume_level: 0.5