3 files
This commit is contained in:
+135
-21
@@ -2490,34 +2490,148 @@
|
||||
mode: restart
|
||||
- id: ai_agent_auto_1784596277269
|
||||
alias: Blink Shed Motion Notification
|
||||
description: Sends a notification when motion is detected by the Blink Backyard
|
||||
Shed camera.
|
||||
description: Sends a notification when motion is detected by any Blink camera, capturing
|
||||
a snapshot and analyzing it with AI for the description.
|
||||
triggers:
|
||||
- entity_id: binary_sensor.blink_backyard_shed_motion
|
||||
id: shed
|
||||
to: 'on'
|
||||
trigger: state
|
||||
- entity_id:
|
||||
- binary_sensor.blink_backyard_tree_motion
|
||||
to:
|
||||
- 'on'
|
||||
- entity_id: binary_sensor.blink_backyard_tree_motion
|
||||
id: tree
|
||||
to: 'on'
|
||||
trigger: state
|
||||
- entity_id:
|
||||
- binary_sensor.blink_front_motion
|
||||
to:
|
||||
- 'on'
|
||||
- entity_id: binary_sensor.blink_front_motion
|
||||
id: front
|
||||
to: 'on'
|
||||
trigger: state
|
||||
- entity_id:
|
||||
- binary_sensor.blink_backyard_tree_motion
|
||||
to:
|
||||
- 'on'
|
||||
trigger: state
|
||||
conditions: []
|
||||
actions:
|
||||
- data:
|
||||
title: Motion Detected!
|
||||
message: Motion detected in the Blink Backyard Cameras using HomeBridge.
|
||||
action: persistent_notification.create
|
||||
mode: single
|
||||
- action: shell_command.cleanup_blink_snapshots
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: shed
|
||||
sequence:
|
||||
- action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.backyard_shed_refresh_snapshot
|
||||
- delay:
|
||||
seconds: 20
|
||||
- action: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: camera.blink_backyard_shed
|
||||
- delay:
|
||||
seconds: 3
|
||||
- variables:
|
||||
snapshot_filename: blink_shed_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg
|
||||
- variables:
|
||||
notification_id: blink_backyard_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}
|
||||
- variables:
|
||||
title: Motion Detected - Backyard Shed
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_backyard_shed
|
||||
data:
|
||||
filename: /media/{{ snapshot_filename }}
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_backyard_shed
|
||||
data:
|
||||
filename: /config/www/{{ snapshot_filename }}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: tree
|
||||
sequence:
|
||||
- action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.backyard_tree_refresh_snapshot
|
||||
- delay:
|
||||
seconds: 20
|
||||
- action: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: camera.blink_backyard_tree
|
||||
- delay:
|
||||
seconds: 3
|
||||
- variables:
|
||||
snapshot_filename: blink_tree_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg
|
||||
- variables:
|
||||
notification_id: blink_backyard_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}
|
||||
- variables:
|
||||
title: Motion Detected - Backyard Tree
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_backyard_tree
|
||||
data:
|
||||
filename: /media/{{ snapshot_filename }}
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_backyard_tree
|
||||
data:
|
||||
filename: /config/www/{{ snapshot_filename }}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: front
|
||||
sequence:
|
||||
- action: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.front_refresh_snapshot
|
||||
- delay:
|
||||
seconds: 20
|
||||
- action: homeassistant.update_entity
|
||||
target:
|
||||
entity_id: camera.front
|
||||
- delay:
|
||||
seconds: 3
|
||||
- variables:
|
||||
snapshot_filename: blink_Front_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg
|
||||
- variables:
|
||||
notification_id: blink_front_{{ now().strftime('%Y%m%d_%H%M%S_%f') }}
|
||||
- variables:
|
||||
title: Motion Detected - Front Door
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_front
|
||||
data:
|
||||
filename: /media/{{ snapshot_filename }}
|
||||
- action: camera.snapshot
|
||||
target:
|
||||
entity_id: camera.blink_front
|
||||
data:
|
||||
filename: /config/www/{{ snapshot_filename }}
|
||||
default:
|
||||
- delay:
|
||||
seconds: 2
|
||||
- delay:
|
||||
seconds: 2
|
||||
- action: ai_task.generate_data
|
||||
continue_on_error: true
|
||||
response_variable: ai_profile
|
||||
data:
|
||||
attachments:
|
||||
- media_content_id: media-source://media_source/local/{{ snapshot_filename }}
|
||||
media_content_type: image/jpeg
|
||||
entity_id: ai_task.ollama_ai_task_video
|
||||
instructions: Describe what you see in this image in brief, but make it a very
|
||||
funny. Focus on any people, objects, animals or activities.
|
||||
task_name: Blink Camera Analysis
|
||||
- action: notify.notify
|
||||
continue_on_error: true
|
||||
data:
|
||||
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.''
|
||||
}}'
|
||||
title: '{{ title }}'
|
||||
- action: persistent_notification.create
|
||||
data:
|
||||
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 }}'
|
||||
title: '{{ title }}'
|
||||
max: 10
|
||||
mode: queued
|
||||
- id: '1784597653614'
|
||||
alias: New automation
|
||||
description: ''
|
||||
|
||||
Reference in New Issue
Block a user