This blueprint is designed to send notifications for the Home Issue Tracker I submitted here:
Simply import this blueprint, and use it with the Issue Tracker I shared there, and you’ll get notifications whenever an issue is opened or closed
blueprint:
name: Issue Tracker Notifications
description: Send a notification whenever an issue is opened or closed from the Issue Tracker.
domain: automation
input:
notify_group:
name: Notification Group
description: The name of the notification group to notify.
default: ""
selector:
text:
mode: queued
variables:
notify_group: !input notify_group
description: "{{ trigger.payload_json['description'] }}"
number: "{{ trigger.payload_json['number'] }}"
status: "{{ trigger.payload_json['status'] }}"
time: "{{ trigger.payload_json['time'] }}"
user: "{{ trigger.payload_json['user'] }}"
trigger:
- platform: mqtt
topic: issue_tracker/#
action:
- service: notify.{{ notify_group }}
data:
title: "{{ description }}"
message: >-
Issue #{{ number }} {{ status.replace('ed', '') + 'ed' }} on
{{ float(time | as_timestamp) | timestamp_custom('%m/%d/%y at %-0I:%M %p')
}} by {{ user }}.
data:
group: issue_{{ number }}