alias: All cams notify telegram description: >- Notify telegram if person detected, doorbell pressed, animals detected, etc. - one automation for all trigger: - type: turned_on platform: device device_id: e81471d76xxxae90dc00 entity_id: 957aaf0xxxecfa8ddc6418d domain: binary_sensor id: Person-Front - type: turned_on platform: device device_id: e81471dxxxf19ae90dc00 entity_id: 4e976b924axxx4d3e4190a6d domain: binary_sensor id: Pet-Front - type: turned_on platform: device device_id: 2d7cff7xxx7a53d8a entity_id: 82d6561ebb2xxx8ca228b25 domain: binary_sensor id: Person-Doorbell enabled: true - type: turned_on platform: device device_id: 2d7cff7xxxe7a53d8a entity_id: b7cd9971xxx6872dfde domain: binary_sensor id: Visitor-Doorbell - type: turned_on platform: device device_id: 31ff6905xcx4e1f5c1b7 entity_id: c16dde75axxx9f353250be domain: binary_sensor id: Person-Back enabled: true - type: turned_on platform: device device_id: 31ff6905xxxe1f5c1b7 entity_id: b854a9eaxxxb94ce959 domain: binary_sensor id: Pet-Back - type: turned_on platform: device device_id: 9e064dxxx1ac58a5050 entity_id: 5cb856xxx728f2c17dca domain: binary_sensor id: Person-Pergola enabled: true - type: turned_on platform: device device_id: 9e064d4xxxac58a5050 entity_id: 218cb4954cxxx11ac06ad domain: binary_sensor id: Pet-Pergola condition: [] action: - choose: - conditions: - condition: trigger id: - Pet-Front - Person-Front sequence: - service: camera.snapshot data: filename: /config/www/tmp/snapshot-{{ trigger.id }}.jpg target: entity_id: camera.ptz_front_sub - conditions: - condition: trigger id: - Person-Doorbell - Visitor-Doorbell sequence: - service: camera.snapshot data: filename: /config/www/tmp/snapshot-{{ trigger.id }}.jpg target: entity_id: camera.doorbell_sub - conditions: - condition: trigger id: - Person-Back - Pet-Back sequence: - service: camera.snapshot data: filename: /config/www/tmp/snapshot-{{ trigger.id }}.jpg target: entity_id: camera.back_camera_brick_shed_sub - conditions: - condition: trigger id: - Person-Pergola - Pet-Pergola sequence: - service: camera.snapshot data: filename: /config/www/tmp/snapshot-{{ trigger.id }}.jpg target: entity_id: camera.backpergola_sub - service: notify.telegrambotforkashub data: data: photo: file: /config/www/tmp/snapshot-{{ trigger.id }}.jpg caption: "CAM: {{ trigger.id }}" message: THIS IS REQUIRED BUT IGNORED BS mode: parallel max: 4