Getting Started¶
Installation¶
- Make sure you have HACS available
- If not, check the HACS Instructions
- Supernotify is one of the default repositories in HACS so no custom repo configuration required
- Select SuperNotify in the list of available integrations in HACS and Download
- Add Supernotify to the Home Assistant YAML configuration
- By default this is
config.yaml, unless you have anincludestatement to move notify platform to another file
- By default this is
- Add a
notifyconfig for thesupernotifyintegration- Give it a
name, "supernotify" is a good choice but it can be anything- You will refer to this on every automation call, for example the action
notify.supernotify
- You will refer to this on every automation call, for example the action
- See
examplesdirectory for working minimal and maximal configuration examples.
- Give it a
- If using email attachments, e.g. from camera snapshot or a
snapshot_url, some extra config needed:- Configure a valid
media_pathin the Supernotify config, usually somewhere under/config - Set the
allowlist_external_dirsin main HomeAssistant config to the same asmedia_pathin the Supernotify configuration
- Configure a valid
Configuration¶
Otherwise, start with the simplest possible config, like the minimal example.
By default, configuration lives in config.yaml, under a notify section. Many people move chunks of config out of here to make it more manageable, like this, so all the notify configuration lives in one file, in this case notify.yaml.
Deliveries explains how to set up the basic notification channels you want, and Configuration Levels how to choose the best place to put configuration for simplicity, clarity and concision. The Recipes show how some popular, and advanced, configuration can be achieved.
Calling the Supernotify Action¶
In your automations, scripts etc, make calls to Supernotify as any other notify action, with a message and an optional title. You can also include any of the newer style Notify Entities in the target. For many cases, you can convert an existing notification call to Supernotify by only changing the action name.
- action: notify.supernotify
data:
title: Security Notification
message: Something went off in the basement
That simple call can be enriched in a few ways, here with a message template (as in regular notify), using person_id targets to derive email, applying some pre-built scenarios, and adding a click action to the mobile push notifications.
- action: notify.supernotify
data:
title: Security Notification
message: '{{state_attr(sensor,"friendly_name")}} triggered'
target:
- person.jim_bob
- person.neighbour
priority: high
apply_scenarios:
- home_security
- garden
delivery:
mobile_push:
data:
clickAction: https://my.home.net/dashboard
clickAction is defined only on the mobile_push delivery. However it is also possible to simply define everything at the top level data section and let the individual transport adaptors pick out the attributes they need. This is helpful either if you don't care about fine tuning delivery configurations, or using existing notification blueprints, such as the popular Frigate Camera Notification Blueprints. - action: notify.supernotifier
data:
message:
data_template:
title: Tank Notification
message: "Fuel tank depth is {{ state_attr('sensor.tank', 'depth') }}"
data:
priority: {% if {{ state_attr('sensor.tank', 'depth') }}<10 }critical{% else %}medium {% endif %}
Lots more ideas in the Recipes for more ideas.