automation hacs_new_repo:
- alias: Create a notification when something is added to HACS
trigger:
platform: event
event_type: hacs/repository
event_data:
action: registration
condition:
condition: template
value_template: "{{ trigger.event.data.repository is defined }}"
action:
service: persistent_notification.create
data_template:
title: New repository in HACS
message: >-
{% set repo = trigger.event.data.repository %}
{% set id = trigger.event.data.repository_id %}
[{{ repo }}](/hacs/repository/{{ id }})
was just added to HACS.