This commit is contained in:
Home Assistant Version Control
2026-07-28 19:49:05 +00:00
parent e5cd3cd83d
commit db80e39dbb
3 changed files with 2 additions and 52 deletions
-50
View File
@@ -3042,53 +3042,3 @@
data:
transition: 1
mode: single
- id: '1785267128982'
alias: Hallway Camera Motion Snapshot
description: Takes a snapshot when the Hallway Nest camera detects motion, analyzes
it with AI, and sends a notification and persistent notification.
triggers:
- trigger: event.received
target:
entity_id: event.hallway_hallway_camera_motion
options:
event_type:
- camera_motion
- camera_person
- camera_sound
actions:
- variables:
snapshot_filename: hallway_{{ now().strftime('%Y%m%d_%H%M%S') }}.png
notification_id: hallway_motion_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}
- action: shell_command.download_camera_image
data:
media_path: /media/{{ snapshot_filename }}
www_path: /config/www/{{ snapshot_filename }}
- action: ai_task.generate_data
continue_on_error: true
response_variable: ai_profile
data:
task_name: Hallway Camera Analysis
entity_id: ai_task.ollama_ai_task_video
instructions: Describe what you see in this image in brief. Focus on any people,
objects, or activities. Text needs to be max 240 characters.
attachments:
- media_content_id: media-source://media_source/local/{{ snapshot_filename }}
media_content_type: image/png
- action: notify.notify
continue_on_error: true
data:
title: Motion Detected - Hallway
message: '{{ ai_profile.data if ai_profile is defined and ''data'' in ai_profile
else ''Motion detected, but the AI Task integration failed to return a response.''
}}'
- action: persistent_notification.create
data:
title: Motion Detected - Hallway
message: '{{ ai_profile.data if ai_profile is defined and ''data'' in ai_profile
else ''Motion detected, but the AI Task integration failed to return a response.''
}}
![Snapshot](/local/{{ snapshot_filename }})'
notification_id: '{{ notification_id }}'
mode: queued
max: 10