3 files
This commit is contained in:
@@ -194,3 +194,5 @@
|
||||
{"timestamp": "2026-07-28T19:46:49.022151+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "test_write", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 9.127140045166016, "success": true, "error_message": null, "response_size_bytes": 183, "user_context": null}
|
||||
{"timestamp": "2026-07-28T19:47:44.768308+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "reload", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 59.276580810546875, "success": true, "error_message": null, "response_size_bytes": 175, "user_context": null}
|
||||
{"timestamp": "2026-07-28T19:47:48.388771+00:00", "tool_name": "ha_call_service", "parameters": {"domain": "shell_command", "service": "test_config_write", "entity_id": null, "data": null, "return_response": false, "wait": true, "verbose": false, "result_fields": null, "result_attribute_keys": null, "ws_command": null}, "execution_time_ms": 9.909391403198242, "success": true, "error_message": null, "response_size_bytes": 197, "user_context": null}
|
||||
{"timestamp": "2026-07-28T19:48:56.573927+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.hallway_camera_motion_snapshot"}, "execution_time_ms": 103.95383834838867, "success": true, "error_message": null, "response_size_bytes": 2020, "user_context": null}
|
||||
{"timestamp": "2026-07-28T19:48:59.324522+00:00", "tool_name": "ha_config_remove_automation", "parameters": {"identifier": "automation.hallway_camera_motion_snapshot", "wait": true}, "execution_time_ms": 112.01000213623047, "success": true, "error_message": null, "response_size_bytes": 169, "user_context": null}
|
||||
|
||||
@@ -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.''
|
||||
}}
|
||||
|
||||
'
|
||||
notification_id: '{{ notification_id }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
|
||||
@@ -5,8 +5,6 @@ default_config:
|
||||
utility_meter:
|
||||
|
||||
# Shell Commands
|
||||
shell_command:
|
||||
cleanup_blink_snapshots: "find /config/www -name 'blink_*.jpg' -mmin +360 -delete"
|
||||
|
||||
# Load ffmpeg
|
||||
ffmpeg:
|
||||
|
||||
Reference in New Issue
Block a user