Telegram alert blueprint
This blueprint is intended as a replacement for the alert integration and uses Telegram to send the alert messages.
It supports these features of the alert integration:
-
Start alert when the state of an entity goes to a certain problem state
-
Provide a fixed number of minutes the alert should be repeated, or a list of numbers for a variable interval
-
Optionally skip the first message, .so it won’t be sent immediately when the entity changes to the problem state
-
Provide an option to acknowledge an alert before the entity is no longer in the problem state
-
Send a message when the entity changes state, to indicate it is no longer in the problem state
In addition, it also supports:
-
Trigger alerts based on an attribute value instead of the entity state
-
Trigger on a numeric value being either below or above a certain value
-
Add actionable buttons which will perform assigned actions
-
Optionally automatically remove previous messages for the alert when a new message is sent
-
Optionally automatically remove previous messages for the alert when the alert is done (either the entity state changed or the alert is acknowledged)
Known limitations:
-
On restart of Home Assistant or when modifying the automation for a specific alert, the repeat sequence will restart. This includes resetting any wait periods and starting at the beginning of the repeat list if a list is provided
-
After restarting Home Assistant or modifying the automation, messages may be sent for alerts previously acknowledged but still in the problem state
-
After restarting Home Assistant, automations will no longer clean up previous alert messages that were active before the restart.
Note: these limitation can be addressed by saving the alert data in a trigger based template sensor. So I’ve included support for this, and created a blueprint to create this template sensor.
If you want to use this template sensor, first create it using the instructions. After creation you can select it in the Alert sensor settings in the blueprint.
Example:
How to use
Import the blueprint using this button:
For more information on all settings, see the documentation.
Coffee
If you think I deserve a coffe, please feel free to buy me one (I might spend it on another beverage though).
In case you decide to do so, thanks a lot!
Or you can do a small donation using PayPal.

