A camera you have to open the app to check is a camera you check after the fact. This recipe turns it around: while the house is armed, any motion sends you a notification with the camera view attached, so you see what set it off the moment it happens. The view is pulled live by the Home Assistant app, so no image is written to your server.
Arming is a simple switch the recipe creates, an armed helper you can put on a dashboard or flip from the app. When it is on the recipe watches; when it is off it sits quiet, so day-to-day movement at home never pings you.
Arming itself
Remembering to arm is the part people forget. Add presence sensors as the optional role and the recipe does it for you: once every sensor has been clear for the delay you set the house arms, and the moment any sensor sees someone it disarms. You keep the manual switch either way, for the times you want it armed while you are home, in the garden or overnight.
Sounding off
A notification is quiet by design. Add a siren as the optional role and it sounds when armed motion is caught, stopping itself after the time you set so it does not run all day if you are out. Add lights and they flash at the same time, a signal that is hard to miss from inside and a visible deterrent from the street.
Files Selora AI's pipeline reads to install this recipe. The manifest declares roles, inputs, and integrations; the package files are Jinja-templated YAML applied to Home Assistant.
# Away Motion Camera Alert — while armed, catch motion and send a notification
# with the camera view attached, optionally sounding a siren and flashing
# lights.
#
# An input_boolean armed helper is the on/off switch. The motion automation
# fires only while it is on. The camera is attached to the notification through
# the Home Assistant app's camera support (data.entity_id), so nothing is
# written to disk and there is no snapshot path to allow-list. Optional presence
# sensors arm and disarm the helper on their own; optional siren and lights add
# a loud and visible response.
slug: away-motion-camera-alert
version: 1.0.0
title: Away Motion Camera Alert
tagline: Armed motion sends a notification with the camera view, and can sound a siren and flash the lights.
description: >-
Watches the motion sensors you pick while the house is armed and sends a
notification with the camera view attached. Optional presence sensors arm and
disarm on their own; an optional siren and lights add a loud, visible
response.
author: Selora AI
released: "2026-08-28"
min_integration_version: "0.12.0"
tags: [security, motion, camera, alerts]
roles:
# Motion sensors watched while armed — multi-select. binary_sensor + motion.
# min_count 1.
- id: motion_sensors
title: Motion sensors
kind: binary_sensor
device_class: motion
min_count: 1
selection: required
description: >-
The motion sensors watched while armed. Any one firing sends the alert.
# Camera attached to the alert. The template attaches exactly one, so the role
# is capped at one rather than accepting extra picks that would do nothing.
# kind camera. min_count 1, max_count 1.
- id: cameras
title: Camera
kind: camera
min_count: 1
max_count: 1
selection: required
description: >-
The camera whose view is attached to the notification.
# Optional presence sensors that arm and disarm the helper. binary_sensor +
# occupancy. min_count 0.
- id: presence_sensors
title: Presence sensors
kind: binary_sensor
device_class: occupancy
min_count: 0
selection: required
description: >-
Optional. Presence sensors that arm the house when all are clear for the
delay and disarm it when any sees someone. Leave empty to arm by hand.
# Optional siren. kind siren. min_count 0.
- id: sirens
title: Sirens
kind: siren
min_count: 0
selection: required
description: >-
Optional. Sirens that sound on armed motion and stop after the siren
time. Leave empty for a silent alert.
# Optional lights to flash. kind light. min_count 0.
- id: lights
title: Alert lights
kind: light
min_count: 0
selection: required
description: >-
Optional. Lights that flash on armed motion. Leave empty to skip.
inputs:
# How long every presence sensor must be clear before the house arms, used
# only when presence sensors are picked.
- id: arm_delay_minutes
type: number
label: Arm delay (minutes)
description: >-
With presence sensors picked, how long they must all be clear before the
house arms.
default: 5
min: 0
max: 240
# How long the optional siren sounds before it stops itself.
- id: siren_seconds
type: number
label: Siren duration (seconds)
description: >-
How long the optional siren sounds on armed motion.
default: 30
min: 1
max: 600
package_files:
- package/helpers/armed_flag.yaml.j2
- package/automations/motion_alert.yaml.j2
{# Away Motion Camera Alert.
The motion automation fires on any selected sensor while the armed helper is
on. It names the sensor that tripped, sends a notification with the camera
attached (the app pulls the view, so nothing is written to disk), then
optionally flashes the lights and sounds the siren.
The siren is stopped by its own automation rather than by a delay inside the
alert. An inline delay would hold the alert run open for the whole siren
duration, and under mode: single every further motion event during that
window is dropped with a warning — silence during exactly the event this
recipe exists to catch. The alert is therefore mode: queued and returns
immediately, and a separate automation switches the siren off once it has
been sounding for its set time.
When presence sensors are picked, two more automations arm the helper once
they are all clear for the delay and disarm it when any sees someone. #}
{% set su = slug | replace('-', '_') %}
{% set armed = 'input_boolean.' ~ su ~ '_armed' %}
automation:
- id: selora_recipe_{{ su }}_motion_alert
alias: "Away Motion Camera Alert: motion while armed"
description: >-
When armed, on motion send a notification with the camera view and
optionally flash lights and sound the siren.
mode: queued
max: 10
trigger:
{% for sensor in roles.motion_sensors %}
- platform: state
entity_id: {{ sensor }}
to: "on"
{% endfor %}
condition:
- condition: state
entity_id: {{ armed }}
state: "on"
action:
- variables:
source: "{% raw %}{{ trigger.to_state.name | default(trigger.entity_id, true) }}{% endraw %}"
- service: notify.notify
data:
title: "Motion while armed"
message: "{% raw %}{{ source }} detected motion while the house is armed.{% endraw %}"
data:
entity_id: "{{ roles.cameras[0] }}"
{% if roles.lights %}
- service: light.turn_on
target:
entity_id:
{% for light in roles.lights %}
- {{ light }}
{% endfor %}
data:
flash: long
{% endif %}
{% if roles.sirens %}
- service: siren.turn_on
target:
entity_id:
{% for siren in roles.sirens %}
- {{ siren }}
{% endfor %}
{% endif %}
{% if roles.sirens %}
- id: selora_recipe_{{ su }}_siren_stop
alias: "Away Motion Camera Alert: stop the siren"
description: >-
Switch the siren off once it has been sounding for its set time.
mode: single
trigger:
{% for siren in roles.sirens %}
- platform: state
entity_id: {{ siren }}
to: "on"
for:
seconds: {{ inputs.siren_seconds }}
{% endfor %}
# A state trigger's for: timer is discarded on restart, and a siren that
# is already on never transitions to on again, so the timed stop would
# never arrive and the alarm would sound until someone silenced it by
# hand. At startup any siren still sounding has already been going since
# before the restart, so the right move is to stop it.
- platform: homeassistant
event: start
condition:
- condition: or
conditions:
{% for siren in roles.sirens %}
- condition: state
entity_id: {{ siren }}
state: "on"
{% endfor %}
action:
- service: siren.turn_off
target:
entity_id:
{% for siren in roles.sirens %}
- {{ siren }}
{% endfor %}
{% endif %}
{% if roles.presence_sensors %}
- id: selora_recipe_{{ su }}_arm
alias: "Away Motion Camera Alert: arm"
description: >-
Arm the house once every presence sensor has been clear for the delay.
mode: single
trigger:
{% for sensor in roles.presence_sensors %}
- platform: state
entity_id: {{ sensor }}
to: "off"
for:
minutes: {{ inputs.arm_delay_minutes }}
{% endfor %}
condition:
# for: applies to every entity in the list, so all of them must have been
# clear for the full delay. The trigger's for: only vouches for the sensor
# that fired; without this a second sensor that cleared moments earlier is
# accepted as soon as it reads off, cutting the delay short whenever more
# than one sensor is picked.
- condition: state
state: "off"
for:
minutes: {{ inputs.arm_delay_minutes }}
entity_id:
{% for sensor in roles.presence_sensors %}
- {{ sensor }}
{% endfor %}
action:
- service: input_boolean.turn_on
target:
entity_id: {{ armed }}
- id: selora_recipe_{{ su }}_disarm
alias: "Away Motion Camera Alert: disarm"
description: >-
Disarm the house the moment any presence sensor sees someone.
mode: single
trigger:
{% for sensor in roles.presence_sensors %}
- platform: state
entity_id: {{ sensor }}
to: "on"
{% endfor %}
action:
- service: input_boolean.turn_off
target:
entity_id: {{ armed }}
{% endif %}
{# Away Motion Camera Alert helper: the armed switch. The motion automation
fires only while this is on. It can be flipped by hand from a dashboard or
the app, and, when presence sensors are picked, the arm and disarm
automations turn it on and off on their own. #}
input_boolean:
{{ slug | replace('-', '_') }}_armed:
name: "Away Motion Camera Alert: armed"
icon: mdi:shield-home