🪫 Low Battery Notifications & Actions

FAQ - How to add a Persistent Notification in the UI

In the UI you have notifications as shown below. This is called a Persistent Notification.

8

When you click on the ‘Notifications’ you will see the notification as shown below. There are 2 ways you can do this.

  1. Use the easy notify option.
  2. Use the custom action option.

9

OPTION1: Use the easy notify option then follow the steps below.

  1. Enable a UI notification option.

  1. Fill out easy notify Title, Message and if enabled enter in your Okay Confirmation Message

OPTION 2: Use the custom action option then follow the steps below.

  1. In the custom actions, click on the ‘+ ADD ACTION’ button

  2. Then start typing ‘notifications’. You will see the notifications options pop up. Select ‘Send a persistent notification’

  3. Then click on the 3 dots and select ‘Edit in YAML’.

  4. Copy the code below and paste it in as shown below. Replace the ‘all_sensors’ with the sensor you would like to use. You can also change how you would receive this message by using a ‘If-then-else’ or a ‘If-then’ action. In another FAQ I show you how to do this, Click Here. In the FAQ link example 6 = Shows you how to receive a ‘Okay confirmation message’ and example 7 = Shows you how to receive a message if there are batteries to report. The below example will just report every time it runs.

service: notify.persistent_notification
metadata: {}
data:
  title: 🪫Low Battery Notification
  message: |-
    • {{all_sensors|replace(', ', '
    • ')}}
  1. Click save and your done :tada:. Next time the automation runs you should receive a notification in the UI.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here