question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notify Engine update and documentation

See original GitHub issue

As Notify Engine is subject of one of my future videos, you can read here more documentation.

I have first started using this script by @CCOSTAN year ago and one of the first things I did was to adapt it to support some specifics of the Android Companion App options.

This script will work with most notification platforms that Home Assistant has integration with (TBH - all I’ve tested so far work, but potentially there could be some that are not supported at the moment).

Script only requires MINIMAL configuration, and that is for you to customise part with available notification platforms in your system.

    - service: >
          {% if who == 'person1' %}
            notify.mobile_app_eml_l29
          {% elif who == 'person2' %}
            notify.mobile_app_ele_l29
          {% elif who == 'kid1' %}
            notify.mobile_app_iphone
          {% elif who == 'kid2' %}
            notify.mobile_app_fig_lx1
          {% elif who == 'parents' %}
            notify.parents
          {% elif who == 'family' %}
            notify.family
          {% elif who == 'discord' %}
            notify.andrej_discord
            {% else %}
            notify.telegram_bot
          {% endif %}

You can add as many integration here as you wish and also by using groups you can group multiple notification platforms into new group (in this example parents, family and discord are multiple devices and services under single name).

And if you want to use it, you just have to call this script from any automation where you need to call it, and provide variables that would customise notifications.

For example, this is what I call from automation if front door is open:

- service: script.notify_engine
  data:
    who: 'family'
    title: '🚪*Front door*'
    value1: 'Front door is open! Outside temperature is {{ states("sensor.balcony_temperature") }}°C'
    tag_id: 'warning'
    group: home
    color: '#ff0000'
    target_id: !secret telegram_bot_chat_id

And you do have a lot of variables you can play with.

Main ones are: who: List of available platforms and variable that is used to select where to push notification title: Title of the message - not all notification platforms support this value1: value2: value3: Value variables are used as messge body. Up to 3 lines can be used target_id: Some platforms require you to specify target ID of the channel for message in ex. Discord, Telegram etc

As minimum, for basic notification platform, you need value1: That is just single line of message. And if you do not specify who: , default platform will be used.

Additional variables that can customise for your notifications look or behave are these: subtitle: Subtitle can be used for text under the title (subtitle in iOS, subject in Android) clickAction: Used toprovide URL that can be called after clisking notification (url in iOS, clickAction in Android) tag_id: Used to tag notifications, useful for mobile app notifications group: Used to group notificatrions, useful for mobile app notifications sticky: Android specific - true will make notification stick even when you press on it, default is false color: Android specific - change notification color. can use hex code or color name (#ff0000 or ‘orange’) channel_id: Android specific - create or use channel for notification. Default is ‘general’ importance_id: Android specific - in combination with channel used to define importance: high, low, max, min and default vibrationPattern: Android specific - NOT YET USED ledColor: Android specific - you can use hex code or color name (#ff0000 or ‘orange’) timeout_sec: Android specific - allows you to atumaticly expire notification after nnn secons - numeric value, in ex. 900 camera_entity: Disply image ios_category: iOS specific - iso_sound: iOS specific - DISABLED ios_badge: iOS specific - DISABLED

Some variables are platform specific, and whenever possible, I’ve tried to combine platform specific commands with one single variable. So even if you have Android and iOS devices in your household, they should receive similar notifications.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
BeardedTinkercommented, Aug 3, 2021

Update all my automation that use Notfiy Script to use same set of variables (most of the time).

Now every call to notify_script: has following format and variables:

- service: script.notify_engine
  data:
    who: 'family'
    title: '*Front door*'
    value1: "Motion in apartment! No family member is home"
    target_id: !secret telegram_bot_chat_id
    group: security
    tag_id: 'emergency'
    importance_id: default
    color: 'red'
    sticky: 'true'
#    timeout: 

Also, created Excel file with all notifications and how they are use, to whom they send message etc. I’m still not using importance_id: so it’s currently at default setting for everything, and not all automation have, use or need timeout:.

1reaction
carltonwbcommented, Aug 15, 2021

“Also, created Excel file with all notifications and how they are use, to whom they send message etc.” Very interesting, I keep a spreadsheet for all my devices, with mac, id, software version, etc. What is your format for the notifications?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notification Engine - Documentation for Remedy IT Service ...
The BMC Remedy IT Service Management (BMC Remedy ITSM) Notification Engine provides a back-end workflow model for defining which ...
Read more >
UAnimNotify::Notify - Unreal Engine Documentation
Access Epic Games' premium fee-based support resource. ... Access or add to our extensive collection of free and fee-based content for Unreal Engine...
Read more >
11 Notification Engine
The notification engine evaluates predicates every time an event is received from time, data or location providers. The engine is triggered whenever there ......
Read more >
Node — Godot Engine (stable) documentation in English
NOTIFICATION_OS_IME_UPDATE = 1013 --- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor...
Read more >
Working with Amazon RDS event notification
Get a notification by email, text message, or a call to an HTTP endpoint when an Amazon RDS event occurs using Amazon SNS....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found