You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To give users more flexibility, frigate-notify could allow them to specify the format of message using templating engines like Jinja2 or Go Templates.
There is an assumption, the user would like to define the individual template for each notifier type.
Since the frigate-notify uses YAML based single configuration file, the template could be built-in as a dedicated top-level configuration section. For example:
frigate:
...
alerts:
...
monitor:
...
template: # or message_templatetelegram: | {{ if .event }} Detection at {{ .event.StartTime }} Camera: {{ .event.Camera }} Label: {{ .event.Label }} {{ event.TopScore }} {{ if ge (len .event.Zones) 1 }} Zone(s): {{ .event.Zones }} {{ end }} Links: [Camera]({{ .config.ServerUri }}/cameras/{{ .event.Camera }}) {{- if .event.HasClip }} | [Event Clip]({{ .config.ServerUri }}/api/events/{{ .event.ID }}/clip.mp4) {{ end }} {{ end }}
...
As usual, if no template is specified, a default template will take effect for a particular notifier.
Thank you.
The text was updated successfully, but these errors were encountered:
To give users more flexibility, frigate-notify could allow them to specify the format of message using templating engines like Jinja2 or Go Templates.
There is an assumption, the user would like to define the individual template for each notifier type.
Since the frigate-notify uses YAML based single configuration file, the template could be built-in as a dedicated top-level configuration section. For example:
As usual, if no template is specified, a default template will take effect for a particular notifier.
Thank you.
The text was updated successfully, but these errors were encountered: