OK, so I finally ditched my Google Nest doorbell for a Reolink PoE video doorbell. I had this great idea to send an image snapshot of the mailbox in front of my house whenever the mail arrives. Problem is, the wide-angle lens of the doorbell provides very little detail in the notification on my Android phone. I can tell if the mail truck is in the frame, but I can hardly see a person alone near the mailbox. Question is: Can Home Assistant crop the snapshot from my doorbell before sending the notification to me?
Here is my current mail arrival image automation:
alias: "Phone Notification: Mailbox was Opened"
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.mailbox_contact_sensor_contact
for:
hours: 0
minutes: 0
seconds: 0
from: "off"
to: "on"
condition: []
action:
- service: camera.snapshot
data:
filename: /config/www/tmp/snapshot-doorbell.jpg
target:
entity_id:
- camera.doorbell_camera_snapshots_sub
- service: notify.mobile_app_pixel_7_pro
data:
data:
ttl: 0
priority: high
image: /local/tmp/snapshot-doorbell.jpg
actions:
- action: URI
title: Open in Reolink
uri: >-
intent:#Intent;launchFlags=0x14000000;component=com.mcu.reolink/com.android.bc.login.WelcomeActivity;S.UID=xxxxxxxxxxxxxx;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;S.DEVNAME=Doorbell;S.ALMTYPE=PEOPLE;S.ALMCHN=1;end
- action: URI
title: Open in Home Assistant
uri: /dashboard-phone/doorbell
message: "{{ now().strftime('%H:%M') }} ~ Mailbox Opened!"
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.mailbox_contact_sensor_contact
to: "off"
for:
hours: 0
minutes: 2
seconds: 0
timeout:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
mode: single