-
-
Save hunterjm/8ff0005104dce3f28923294f49a443b1 to your computer and use it in GitHub Desktop.
blueprint: | |
name: Frigate Notification (0.10.0) | |
description: | | |
## Frigate Mobile App Notification | |
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot. | |
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1]. | |
### Software Version Requirements | |
Minimum Home Assistant Version: 2022.2 | |
Minimum Frigate Version: 0.10.0 Beta 10 | |
Minimum Frigate Integration Version: 2.2.0 | |
Minimum iOS Version: 15.0 | |
### Required entities: | |
- Frigate Camera Name | |
- Mobile App Device **or** the name of a Notification Group | |
### Optional features: | |
- You can optionally send the notification as a critical alert. | |
- You can choose whether or not to update the notification with new thumbnails as they become available. | |
- You can limit notifications to objects entering pre-defined [zones][2] in Frigate. | |
- You can specify which [zones][2] to be notified about. This must be a list (e.g.): | |
```yaml | |
- backyard | |
``` | |
- You can specify what type of [objects][3] to be notified about. This must be a list (e.g.): | |
```yaml | |
- person | |
- car | |
``` | |
- You can disable notifications if a presence entity or group is "home". | |
- You can configure a cooldown for the camera to reduce the number of notifications when back-to-back events occur. | |
- You can silence future notifications for a defined amount of time through actionable notifications. This is helpful in situations where you know you will be triggering detections for an extended period of time. i.e. kids playing outside. | |
- You can set a loitering timer to notify you of stationary objects that remain for a set period of time. | |
[1]: https://companion.home-assistant.io/docs/notifications/notifications-basic#sending-notifications-to-multiple-devices | |
[2]: https://blakeblackshear.github.io/frigate/configuration/cameras#zones | |
[3]: https://blakeblackshear.github.io/frigate/configuration/objects | |
domain: automation | |
source_url: https://gist.github.com/hunterjm/8ff0005104dce3f28923294f49a443b1 | |
input: | |
camera: | |
name: Frigate Camera | |
description: The name of the camera as defined in your frigate configuration. | |
notify_device: | |
name: Device | |
description: The device must run the official Home Assistant app to receive notifications. | |
default: false | |
selector: | |
device: | |
integration: mobile_app | |
notify_group: | |
name: Notification Group | |
description: The name of the notification group to call. | |
default: "" | |
base_url: | |
name: (Optional) Base URL | |
description: > | |
The external url for your Home Assistant instance. This will default to a relative | |
URL and will open the clips in the app instead of the browser, which does not work well on iOS. | |
default: "" | |
critical: | |
name: (Optional) Critical Notification | |
description: Send as a critical notification to the mobile device. | |
default: false | |
selector: | |
boolean: | |
update_thumbnail: | |
name: (Optional) Update Thumbnail | |
description: Update notification if a new "better" thumbnail is available. | |
default: false | |
selector: | |
boolean: | |
zone_filter: | |
name: (Optional) Zone Filter | |
description: Only notify if object has entered a defined zone. | |
default: false | |
selector: | |
boolean: | |
zones: | |
name: (Optional) Trigger Zones | |
description: A list (-) of zones you wish to recieve notifications for. | |
default: [] | |
selector: | |
object: | |
labels: | |
name: (Optional) Trigger Objects | |
description: A list (-) of objects you wish to recieve notifications for. | |
default: [] | |
selector: | |
object: | |
presence_filter: | |
name: (Optional) Presence Filter | |
description: Only notify if selected presence entity is not "home". | |
default: "" | |
selector: | |
entity: | |
cooldown: | |
name: (Optional) Cooldown | |
description: Delay before sending another notification for this camera after the last event. | |
default: 30 | |
selector: | |
number: | |
max: 300 | |
min: 0 | |
unit_of_measurement: seconds | |
silence_timer: | |
name: (Optional) Silence New Object Notifications | |
description: > | |
How long to silence notifications for this camera when requested as part of the | |
actionable notification. Note: This only applies to new objects. Existing tracked | |
objects | |
default: 30 | |
selector: | |
number: | |
max: 300 | |
min: 0 | |
unit_of_measurement: minutes | |
loiter_timer: | |
name: (Optional) Loitering Notifications | |
description: > | |
Sends new loitering notification if a stationary object is detected for longer | |
than the specified time. 0 is off and will not send notifications. | |
default: 0 | |
selector: | |
number: | |
max: 300 | |
min: 0 | |
unit_of_measurement: minutes | |
mode: parallel | |
trigger_variables: | |
camera: !input camera | |
trigger: | |
- platform: event | |
event_type: mobile_app_notification_action | |
event_data: | |
action: 'silence-{{ camera }}' | |
id: silence | |
- platform: mqtt | |
topic: frigate/events | |
payload: "{{ camera }}/new" | |
value_template: "{{ value_json['after']['camera'] }}/{{ value_json['type']}}" | |
id: frigate-event | |
variables: | |
camera: !input camera | |
camera_name: "{{ camera | replace('_', ' ') | title }}" | |
base_url: !input base_url | |
critical: !input critical | |
update_thumbnail: !input update_thumbnail | |
group_target: !input notify_group | |
zone_only: !input zone_filter | |
input_zones: !input zones | |
zones: "{{ input_zones | list }}" | |
input_labels: !input labels | |
labels: "{{ input_labels | list }}" | |
presence_entity: !input presence_filter | |
cooldown: !input cooldown | |
loiter_timer: !input loiter_timer | |
fps_value: "{{ states('sensor.' + camera + '_camera_fps') }}" | |
fps: "{{ fps_value|int if is_number(fps_value) or 5 }}" | |
action: | |
- choose: | |
- alias: "Silence New Object Notifications" | |
conditions: | |
- condition: trigger | |
id: silence | |
sequence: | |
- service: automation.turn_off | |
target: | |
entity_id: "{{ this.entity_id }}" | |
data: | |
stop_actions: false | |
- delay: | |
minutes: !input silence_timer | |
- service: automation.turn_on | |
target: | |
entity_id: "{{ this.entity_id }}" | |
- alias: "Frigate Event" | |
conditions: | |
- condition: trigger | |
id: "frigate-event" | |
- "{{ is_state(this.entity_id, 'on') }}" | |
- "{{ not this.attributes.last_triggered or (now() - this.attributes.last_triggered).seconds > cooldown }}" | |
sequence: | |
- variables: | |
id: "{{ trigger.payload_json['after']['id'] }}" | |
object: "{{ trigger.payload_json['after']['label'] }}" | |
label: "{{ object | title }}" | |
# Dynamic Variables per event | |
initial_home: "{{ presence_entity != '' and is_state(presence_entity, 'home') }}" | |
initial_entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}" | |
- alias: "Notifications enabled for object label" | |
condition: template | |
value_template: "{{ not labels|length or object in labels }}" | |
- alias: "Notify on new object" | |
choose: | |
- conditions: | |
- "{{ not zone_only or initial_entered_zones|length > 0 }}" | |
- "{{ not zones|length or zones|select('in', initial_entered_zones)|list|length > 0 }}" | |
- "{{ not initial_home }}" | |
sequence: | |
- choose: | |
- conditions: "{{ not group_target }}" | |
sequence: | |
- device_id: !input notify_device | |
domain: mobile_app | |
type: notify | |
message: "A {{ label }} was detected on the {{ camera_name }} camera." | |
data: | |
tag: "{{ id }}" | |
group: "frigate-notification-{{ camera }}" | |
# Android Specific | |
image: "/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android" | |
clickAction: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
ttl: "{{ iif(critical, 0, 3600000) }}" | |
priority: "{{ iif(critical, 'high', 'normal') }}" | |
# iOS Specific | |
url: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
attachment: | |
url: "/api/frigate/notifications/{{id}}/thumbnail.jpg" | |
push: | |
interruption-level: "{{ iif(critical, 'critical', 'active') }}" | |
# Actions | |
actions: | |
- action: URI | |
title: View Clip | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
- action: URI | |
title: View Snapshot | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg" | |
- action: "silence-{{ camera }}" | |
title: Silence New Notifications | |
destructive: true | |
default: | |
- service: "notify.{{ group_target }}" | |
data: | |
message: "A {{ label }} was detected on the {{ camera_name }} camera." | |
data: | |
tag: "{{ id }}" | |
group: "frigate-notification-{{ camera }}" | |
# Android Specific | |
image: "/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android" | |
clickAction: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
ttl: "{{ iif(critical, 0, 3600000) }}" | |
priority: "{{ iif(critical, 'high', 'normal') }}" | |
# iOS Specific | |
url: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
attachment: | |
url: "/api/frigate/notifications/{{id}}/thumbnail.jpg" | |
push: | |
interruption-level: "{{ iif(critical, 'critical', 'active') }}" | |
# Actions | |
actions: | |
- action: URI | |
title: View Clip | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
- action: URI | |
title: View Snapshot | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg" | |
- action: "silence-{{ camera }}" | |
title: Silence New Notifications | |
destructive: true | |
- repeat: | |
sequence: | |
- wait_for_trigger: | |
- platform: mqtt | |
topic: frigate/events | |
payload: "{{ id }}" | |
value_template: "{{ value_json['after']['id'] }}" | |
timeout: | |
minutes: 2 | |
continue_on_timeout: false | |
- variables: | |
event: "{{ wait.trigger.payload_json }}" | |
loitering: "{{ loiter_timer and event['before']['motionless_count']/fps/60 < loiter_timer and event['after']['motionless_count']/fps/60 >= loiter_timer }}" | |
new_snapshot: "{{ update_thumbnail and event['before']['snapshot_time'] != event['after']['snapshot_time'] }}" | |
home: "{{ presence_entity != '' and is_state(presence_entity, 'home') }}" | |
presence_changed: "{{ presence_entity != '' and as_datetime(event['before']['frame_time']) < states[presence_entity].last_changed }}" | |
last_zones: "{{ event['before']['entered_zones'] }}" | |
entered_zones: "{{ event['after']['entered_zones'] }}" | |
zone_filter: "{{ not zone_only or entered_zones|length > 0 }}" | |
stationary_moved: "{{ event['after']['position_changes'] > event['before']['position_changes'] }}" | |
zone_only_changed: "{{ zone_only and (entered_zones|length > 0 and not last_zones|length) }}" | |
entered_zones_changed: "{{ zones|length > 0 and (zones|select('in', entered_zones)|list|length > 0 and not zones|select('in', last_zones)|list|length) }}" | |
update: "{{ new_snapshot and not loitering and not presence_changed and not zone_only_changed and not entered_zones_changed }}" | |
- alias: "Notify on loitering or significant change" | |
choose: | |
- conditions: "{{ loitering or (not home and zone_filter and (new_snapshot or presence_changed or stationary_moved or zone_only_changed or entered_zones_changed)) }}" | |
sequence: | |
- choose: | |
- conditions: "{{ not group_target }}" | |
sequence: | |
- device_id: !input notify_device | |
domain: mobile_app | |
type: notify | |
message: "A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} on the {{ camera_name }} camera." | |
data: | |
tag: "{{ id }}{{'-loitering' if loitering}}" | |
group: "frigate-notification-{{ camera }}{{'-loitering' if loitering}}" | |
# Android Specific | |
image: "/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android" | |
clickAction: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
ttl: "{{ iif(critical, 0, 3600000) }}" | |
priority: "{{ iif(critical, 'high', 'normal') }}" | |
# iOS Specific | |
url: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
attachment: | |
url: "/api/frigate/notifications/{{id}}/thumbnail.jpg" | |
sound: "{{ iif(update, 'none', 'default') }}" | |
push: | |
interruption-level: "{{ iif(critical, 'critical', 'active') }}" | |
# Actions | |
actions: | |
- action: URI | |
title: View Clip | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
- action: URI | |
title: View Snapshot | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg" | |
- action: "silence-{{ camera }}" | |
title: Silence New Notifications | |
destructive: true | |
default: | |
- service: "notify.{{ group_target }}" | |
data: | |
message: "A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} on the {{ camera_name }} camera." | |
data: | |
tag: "{{ id }}{{'-loitering' if loitering}}" | |
group: "frigate-notification-{{ camera }}{{'-loitering' if loitering}}" | |
# Android Specific | |
image: "/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android" | |
clickAction: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
ttl: "{{ iif(critical, 0, 3600000) }}" | |
priority: "{{ iif(critical, 'high', 'normal') }}" | |
# iOS Specific | |
url: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
attachment: | |
url: "/api/frigate/notifications/{{id}}/thumbnail.jpg" | |
sound: "{{ iif(update, 'none', 'default') }}" | |
push: | |
interruption-level: "{{ iif(critical, 'critical', 'active') }}" | |
# Actions | |
actions: | |
- action: URI | |
title: View Clip | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4" | |
- action: URI | |
title: View Snapshot | |
uri: "{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg" | |
- action: "silence-{{ camera }}" | |
title: Silence New Notifications | |
destructive: true | |
until: "{{ not wait.trigger or wait.trigger.payload_json['type'] == 'end' }}" |
Hallo,
I am using Home Assistant OS on a virtual machine. I have HACS integrated, Frigate Proxy installed as an add-on, and am trying to use the Frigate Notifications Blueprint 0.10 to automate notifications.
The setup worked as early as today. Until I redeployed Home Assistant from scratch, using the same VM settings. This was done since the URLs Home Assistant referenced were invalid. Due to the migration from a VM on my laptop to a VM in ProxMox. The setup worked for a few weeks since migrating it to ProxMox, but the broken Snapshot URLs and the broken 'Home Assistant Links' on the internet got annoying. So I reckoned setting it up again from scratch would be a good exercise in understanding the software better and fixing the issue.
I configured the instance to match how it'd been configured before. However, there appears to have been a change to Frigate Notifications Blueprint between the latest release and its predecessor. The difference seems to break the automation.
I configured both versions of the blueprint and tested the same configuration for each simultaneously. The older version triggered, but the newer did not.
https://pastebin.com/NQXPDQ4s
Password: yvG9LEfpxsL*5^AVk9wBxH^3FVGXH-J&
I did my best to provide relevant, comprehensive information about the problem I face.
Please let me know if you have any questions.
Thank you in advance for your attention and participation!!
Pröst!
I'm pretty sure or
should be else
in that line, @algernopeGH. fps: "{{ fps_value|int if is_number(fps_value) else 5 }}"
My first attempt at modifying the blueprint failed. So I forked this gist, made the change, and imported it as a new blueprint. The change is successful.
Thank you for your time and help @toddrob99!!
I attached screenshots illustrating the change and how it succeeded. In the one screenshot, I disabled the other automations to determine if this change worked more quickly.
Huge thanks to @hunterjm for creating the blueprint, too!
!
Hello,
Using the Frigate 0.10 notification Home Assistant Blueprint I and other have noticed that the following features don't work:
Zone filters - is completely ignored.
Silence New Object Notifications - Mute/silence option in the notification - is completely ignored.
Cooldown option - Delay before sending another notification for this camera after the last event - is completely ignored.
To note I am using it with Frigate Beta 0.11 v2 although I'm quite confident that this issue happened before I used the BETA (I am not 100% sure however).
I have tried changing various settings and it seems that no combination of settings in the automation makes any difference, even extreme values makes no difference.
It is really irritating as it makes all of our devices vibrate and notify all day long, soon eating up the daily 500 notification limit that Home Assistant is allowed.
I have spent hours looking through the code but it's hopeless for me :(.
You can see in the logs that the zone is passed through, even if it's not one sent to notify on it still does:
trigger:
id: '0'
idx: '0'
platform: mqtt
topic: frigate/events
payload: (some entries removed)
"position_changes":
1, "current_zones": ["frontdoorpath"], "entered_zones": ["frontdoorpath"],
"has_clip": true, "has_snapshot": false}, "type": "update"}
I have all of the logs saved of this issue please let me know if you would like me to send it over.
I have the same problem either running as a Home Assistant OS Addon or as a fully separated Docker container Instance.
There are other people reporting the issue here:
https://community.home-assistant.io/t/frigate-mobile-app-notifications/311091/315
Many thanks,
Laurence
@LaurenceGough I remember having a similar problem with the zone filter. I ended up changing some of the conditions and it has been working perfectly for me.
Line 285 was changed to
check_zone_filter: "{{ (not zones|length or zones|select('in', entered_zones)|list|length > 0) and (not zone_only or entered_zones|length > 0) }}"
Line 292 was changed to
- conditions: "{{ ((entered_zones_changed or check_zone_filter) or (check_zone_filter and (new_snapshot or stationary_moved)) or loitering) and (not home) }}"
@LaurenceGough I remember having a similar problem with the zone filter. I ended up changing some of the conditions and it has been working perfectly for me.
Line 285 was changed to
check_zone_filter: "{{ (not zones|length or zones|select('in', entered_zones)|list|length > 0) and (not zone_only or entered_zones|length > 0) }}"
Line 292 was changed to
- conditions: "{{ ((entered_zones_changed or check_zone_filter) or (check_zone_filter and (new_snapshot or stationary_moved)) or loitering) and (not home) }}"
You genius, you fixed it!
They should call you the magic man!
Thank you so much!
It still seems to completely ignore the 30 second cooldown timer before the automation runs again but hey, it's a lot better now.
I love the blueprint thank you for all of your hard work. I recently added double take to my home assistant instance. And am able to while using the beta frigate get double take to automatically updat the sub label for events to the correctly identified person. Is there anyway on the notifications to instead of use generic label for person update to a sub label list?
@Fredrick-III & @LaurenceGough, after making the suggested change to fix zone filter (which I don't use anyway), I was receiving repeated update notifications despite having "Update Thumbnail" and "Loitering Notifications" disabled. I believe this was due to the condition on Line 292 not honoring those settings, and I fixed the issue by adding "and update" to the condition:
'- conditions: "{{ ((entered_zones_changed or check_zone_filter) or (check_zone_filter and (new_snapshot or stationary_moved)) or loitering) and (not home) and update }}"'
I am maintaining a fork of this blueprint that contains the fixes identified in the comments here.
@Fredrick-III & @LaurenceGough, after making the suggested change to fix zone filter (which I don't use anyway), I was receiving repeated update notifications despite having "Update Thumbnail" and "Loitering Notifications" disabled. I believe this was due to the condition on Line 292 not honoring those settings, and I fixed the issue by adding "and update" to the condition: '- conditions: "{{ ((entered_zones_changed or check_zone_filter) or (check_zone_filter and (new_snapshot or stationary_moved)) or loitering) and (not home) and update }}"'
I am maintaining a fork of this blueprint that contains the fixes identified in the comments here.
Thanks but I'm afraid it didn't work :(. Still get up to 60 notifications per a person in a zone, especially if they hang around. Twice I've hit my 500 notification limit.
I never get a notification from someone out of the zone specified, but when there is someone in the zone it seems Home Assistant is racing to produce as many notifications as it can, causing a queue as it then can go carry on sending notifications for as long as 10-15 minutes after they leave the zone with an old photo of them.
That's what I was seeing @LaurenceGough, and the change I made fixed it. What are the settings for your automation? I have "Update Thumbnail" turned off, and Loitering Notifications set to 0. If you export your automation trace I am willing to take a look and try to debug it.
Also, I believe the number of notifications is based on the number of updates from Frigate, not that Home Assistant (the automation) is sending duplicates on its own.
Is it possible to add some conditions like time to the notifications?
For example i don´t want notifications during daytime when people are outside but i do want notifications during evening and night if someone is lurking around.
That's what I was seeing @LaurenceGough, and the change I made fixed it. What are the settings for your automation? I have "Update Thumbnail" turned off, and Loitering Notifications set to 0. If you export your automation trace I am willing to take a look and try to debug it.
Also, I believe the number of notifications is based on the number of updates from Frigate, not that Home Assistant (the automation) is sending duplicates on its own.
Thanks Todd I turned update thumbnail off and that seems to have helped. The other day I also was lucky enough to receive a Coral accelerator, with the two combined the issue is resolved now it seems, massively reduced anyway! Thanks so much for your help all.
Is it possible to add some conditions like time to the notifications?
For example i don´t want notifications during daytime when people are outside but i do want notifications during evening and night if someone is lurking around.
Hi NBD, I'd say the best way to do this would be to create another automation with time based triggers/conditions to turn on and off this blueprint automation.
I think some others have created forks of this blueprint to add timers but the suggestion above would be more future proof as the blueprint gets updated etc.
@NBD99 I wanted more control over when notifications are triggered, too, so in my fork I added support for a "Notifications Enabled Entity." I created a template sensor that takes all the variables into consideration (my device tracker group is home, an input_boolean for whether or not I want alerts while someone is home, and an input_boolean to temporarily disable all alerts (including door open/close, lock/unlock, etc.). When that sensor is True, notifications will be sent (if the other settings on the blueprint are satisfied); when it's False, notifications are suppressed. Currently my template sensor is NOT set to False when I silence notifications from the actionable notifications from this blueprint, because that just disables the automation for some time. Not sure if all that really fits your use case, but thought I'd throw it out there.
That's what I was seeing @LaurenceGough, and the change I made fixed it. What are the settings for your automation? I have "Update Thumbnail" turned off, and Loitering Notifications set to 0. If you export your automation trace I am willing to take a look and try to debug it.
Also, I believe the number of notifications is based on the number of updates from Frigate, not that Home Assistant (the automation) is sending duplicates on its own.
I spoke way too soon it seems, it went crazy today when a few people decided to loiter outside. Probably 200-300 notifications in under an hour.
I'll drop you the trace if you find any time to take a look at it it'd be massively appreciated, I don't think I'll have any hair left at this rate.
Is it possible to add some conditions like time to the notifications?
For example i don´t want notifications during daytime when people are outside but i do want notifications during evening and night if someone is lurking around.Hi NBD, I'd say the best way to do this would be to create another automation with time based triggers/conditions to turn on and off this blueprint automation.
I think some others have created forks of this blueprint to add timers but the suggestion above would be more future proof as the blueprint gets updated etc.
Well that actually seems like a quite simple solution that i haven't thought about. I tried it today and it worked like a charm, thank you!
Blueprints are great and this is a super way to get notifications but I am wondering, would anyone else find it useful to have a way that the automation could set the timeout based on another sensor. I have door open sensor and each time out a door I get a notif door opened and now I also get the Frigate person. Ideally the door open one would delay the corresponding camera notification for a period of time. I'm gonna try to figure it out but it's likely to take me longer than the next revision of this LOL. Please reply if you would like this feature and maybe HunterJM will consider it.
Has anyone gotten the Silence Notifications to work? This is becoming a very big annoyance in the household. I love the Blueprint other than this.
[2]: https://blakeblackshear.github.io/frigate/configuration/cameras#zones
should now be
[2]: https://blakeblackshear.github.io/frigate/configuration/zones
There's a typo in this blueprint...
fps: "{{ fps_value|int if is_number(fps_value) or 5 }}"
should be:
fps: "{{ fps_value|int if is_number(fps_value) else 5 }}"
Sorry posted this in the wrong gist. Anyone having issues seeing the snapshot in the notification on IOS 16? After updating i dont see the snapshot, just the text.
Sorry posted this in the wrong gist. Anyone having issues seeing the snapshot in the notification on IOS 16? After updating i dont see the snapshot, just the text.
Same here, no images show up in my alerts anymore.
Getting Error rendering variables: ValueError: Template error: int got invalid input 'unknown' when rendering template '{{ fps_value|int if is_number(fps_value) or 5 }}' but no default was specified
, which is probably related to typo mentioned earlier.
Great work! Working great for me. I'm not great with yaml, but I have something similar in Python where my cooldown timer is incremental by comparing the current cooldown time to a previously saved cooldown time, and if the previously cool down time is later, add the cooldown to that time. Are you able to do something like that in your script?
Basically the more events you have in a short period, the more seconds it keeps adding, resulting in fewer and fewer notifications until things truly cool down!
Hi, appreciate your work!
Suggestion as int filter cannot convert the value “unknown” to a number:
- fps: "{{ fps_value|int if is_number(fps_value) or 5 }}"
+ fps: "{{ fps_value|int if is_number(fps_value)|int(5) }}"
Hi, appreciate your work! Suggestion as int filter cannot convert the value “unknown” to a number:
- fps: "{{ fps_value|int if is_number(fps_value) or 5 }}" + fps: "{{ fps_value|int if is_number(fps_value)|int(5) }}"
I had the same issue. You need to make sure the FPS sensors are enabled for your cameras.
Look for any disabled entities with the name sensor_[cameraname]_fps
and enable them.
There's a typo in this blueprint...
fps: "{{ fps_value|int if is_number(fps_value) or 5 }}"
should be:
fps: "{{ fps_value|int if is_number(fps_value) else 5 }}"
Just installed Frigate and got that working well and now trying out this Blueprint. No notifications received for any of my cameras. Triple checked everything but couldn't see what I had got wrong. Then I found your post and corrected the typo. Now all working. Thank you for the tip off.
Hi, appreciate your work! Suggestion as int filter cannot convert the value “unknown” to a number:
- fps: "{{ fps_value|int if is_number(fps_value) or 5 }}" + fps: "{{ fps_value|int if is_number(fps_value)|int(5) }}"
same here, didnt work for me, wasnt sure why. applied your fix, and now working. Please update the blueprint
Any plans to update for v12.x?
You should be able to do this with another automation that toggles this one at different times of day