I was recently able to integrate a new doorbell camera into Home Assistant. Ideally I'd like to setup an automation to notify my phone when someone pushes the doorbell button. When I click one button I'd like the script to open the Home Assistant app and then show a card with video from the door. Here is the code that I've tried so far:
alias: Loren Confirmable Notification
use_blueprint:
path: homeassistant/confirmable_notification.yaml
input:
notify_device: xxxxxxxxxxxxxxx
title: Front Door
message: Someone just rang the front doorbell
confirm_action:
- event: ""
event_data:
data:
push:
category: camera
actions:
- action: URI
title: Open Home Assistant
uri: homeassistant://redirect
- action: automation.trigger
metadata: {}
target:
entity_id: automation.doorbell_test_2
data:
skip_condition: true
confirm_text: Answer
dismiss_text: Ignore
description: ""
TL;DR: Don't use the confirmable_notification blueprint, it's only for yes/no confirmations. Write a plain automation that calls notify.mobile_app_* directly, put a snapshot in the notification, and use clickAction/url to open a dashboard view with your camera card.
The blueprint is the problem: it's built for "are you sure?" prompts, so camera previews and "open the app to a card" don't fit inside it. Do it directly instead:
Android:
alias: Doorbell - notify phone
triggers:
- trigger: state
entity_id: binary_sensor.front_door_doorbell # doorbell button
to: "on"
actions:
- action: notify.mobile_app_lorens_phone # your phone
data:
title: Front Door
message: Someone is at the front door
data:
image: /api/camera_proxy/camera.front_door # snapshot in the notification
clickAction: /lovelace/cameras # tap opens this view
tag: doorbell
priority: high
iOS swaps two keys (entity_id attachment + url):
data:
entity_id: camera.front_door
url: /lovelace/cameras
push:
category: camera
Make a Lovelace view with a live camera card and point clickAction/url at its path. Swap in your real entity ids. If you'd rather not hand-build it, there are turnkey doorbell notification blueprints on this forum that do the same thing.