Skip to content

Commit

Permalink
Upgrade blueprint to v1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinfrlch committed Jan 26, 2025
1 parent 60d56a2 commit 7b81ed3
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions blueprints/event_summary.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blueprint:
name: AI Event Summary (LLM Vision v1.3.5)
name: AI Event Summary (LLM Vision v1.3.7)
author: valentinfrlch
description: >
AI-powered security event summaries for frigate or camera entities.
Expand Down Expand Up @@ -52,6 +52,16 @@ blueprint:
multiple: true
filter:
domain: camera
required_zones:
name: Required Zone(s)
description: >-
(Frigate mode only)
Only run if the Frigate event occurs within the specified zones (e.g., Driveway, Entry, etc.)
default: []
selector:
text:
multiline: false
multiple: true
object_type:
name: Included Object Type(s)
description: >-
Expand All @@ -63,6 +73,15 @@ blueprint:
text:
multiline: false
multiple: true
ignore_stationary:
name: Ignore Stationary Objects
description: >-
(Frigate mode only)
Does not alert if objects are detected as stationary by Frigate.
default: true
selector:
boolean:
trigger_state:
name: Trigger State
description: >-
Expand Down Expand Up @@ -208,11 +227,13 @@ variables:
{% endfor %}
{{ ns.device_names }}
camera_entities_list: !input camera_entities
required_zones_list: !input required_zones
object_types_list: !input object_type
ignore_stationary: !input ignore_stationary
motion_sensors_list: !input motion_sensors
camera_entity: >
{% if mode == 'Camera' %}
{% if motion_sensors_list and not "camera" in trigger.entity_id %}
{% if motion_sensors_list and not trigger.entity_id.startswith("camera") %}
{% set index = motion_sensors_list.index(trigger.entity_id) %}
{{ camera_entities_list[index] }}
{% else %}
Expand Down Expand Up @@ -265,13 +286,13 @@ variables:
Reply with these replies exactly.
max_exceeded: silent

mode: single

trigger:
- platform: mqtt
topic: "frigate/events"
id: frigate_trigger
enabled: "{{mode == 'Frigate'}}"
- platform: 'state'
entity_id: !input camera_entities
to: !input trigger_state
Expand All @@ -288,8 +309,10 @@ condition:
{{ trigger.payload_json["type"] == "end"
and ('camera.' + trigger.payload_json['after']['camera']|lower) in camera_entities_list
and ((object_types_list|length) == 0 or ((trigger.payload_json['after']['label']|lower) in object_types_list))
and (not required_zones_list or ((set(trigger.payload_json['after']['current_zones']).intersection(required_zones_list))))
and not (ignore_stationary and trigger.payload_json['after']['stationary'])
}}
{%else%}
{% else %}
true
{% endif %}
Expand Down

0 comments on commit 7b81ed3

Please sign in to comment.