Script
#### NOTIFY TELEGRAM
notify_telegram:
sequence:
- service: notify.telegram
data_template:
title: '{{ title }}'
message: '{{ message }}'
data:
photo:
file: '{{ file }}'
caption: '{{ caption }}'
Automação
- action:
- data:
entity_id: camera.Entrada
filename: '/tmp/latest_hall_entrada.jpg'
service: camera.snapshot
- service: notify.telegram
data_template:
title: "{{ as_timestamp (now()) | timestamp_custom('%d/%b/%Y %T') }}"
message: Porta da Rua - ABERTA
file: "/config/cam_snapshots/latest_hall_entrada.jpg"
caption: "{{ as_timestamp (now()) | timestamp_custom('%d/%b/%Y %T') }} \n Porta da Rua - ABERTA"
alias: Alarme
condition:
- condition: state
entity_id: input_boolean.pir
state: 'on'
id: '1525355444516'
trigger:
- entity_id: sensor.porta
from: FECHADA
platform: state
to: ABERTA
