Skip to content

Commit

Permalink
Merge pull request #169 from amcfague/patch-2
Browse files Browse the repository at this point in the history
- Add frigate zone filter
- Add frigate ignore_stationary option
  • Loading branch information
valentinfrlch authored Jan 19, 2025
2 parents dc9bd34 + 3dbbe5b commit 345ac3b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion blueprints/event_summary_beta.yaml
Original file line number Diff line number Diff line change
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,7 +227,9 @@ 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' %}
Expand Down Expand Up @@ -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 345ac3b

Please sign in to comment.