Yes! Now HomeAssistant can make a Telegram phone call (with Voice) thanks to the CallMeBot API. You just need HA to execute a WGET or CURL command to get a Telegram Voice call and "read" your message.

URL to use:

http://api.callmebot.com/start.php?source=HA&user=@user&text=This is Home Assistant calling to you to inform you about something that is happening at your house&lang=en-GB-Standard-B

Parameters:
user is your Telegram Username/Alias (i.e @myusername) or you can also use your phone number including the international code. Important!: You need to authorize CallMeBot to contact you  here. This is required to avoid spam.
text, is the message that you want the bot to speak. You can encode the URL (i.e. %20 istead of space) or use the symbol "_" for the spaces.
lang is the language/voice that you want the bot to speak. You can get the list of languages here. Use the "Voice Name" (4th column) as parameter to use. Please note that only the Standard languages are supported. (Wavenet premium languages/voices  won't work with this API).

For example, calling to @myusername and speak the message in English with a Male voice:

wget "http://api.callmebot.com/start.php?source=HA&user=@myusername&text=This_is_Home_Assistant_calling_to_you_to_inform_you_about_something_that_is_happening_at_your_house&lang=en-GB-Standard-B"

For example, calling to +34 123 123 1123 and speak the message in Spanish:

wget "http://api.callmebot.com/start.php?source=HA&user=+331231231123&text=Este_es_Home_Assistant_llamando_para_informar_sobre_algo_que_esta_sucediendo_en_tu casa&lang=es-ES-Standard-A"

To do that in HA is pretty easy! You have different ways to do it.

Instructions: Using the HA REST Notify service:

Note: There is a bug in HA REST component introduced in version 2020.12 (possible since 0118.x). The issue seems to be resolved in the release 2021.2.0. More details here.

0) You need to authorize CallMeBot to contact you here. This is required to avoid spam.

1) Create a new "REST Notify" service in the configuration.yaml:

# Example configuration.yaml entry 
notify:
- name: Telegram_Call
platform: rest
resource: https://api.callmebot.com/start.php
data:
source: HA
user: "@username" #enter your telegram username
lang: en-GB-Standard-B #specify the languange and voice to use. See above the different options.
rpt: 2 #how many times you want the message to be repeated by the bot.
 
 2) Use the notification component from a script or automation passing the message as data.
# YAML code
...
action:  service: notify.Telegram_Call  data:    message: "This+is+Home+Assistant+calling+you+a+to+inform+you+about+something+urgent"
Example using the UI Editor:
Home Assistant UI Editor Telegram Calls
 
3) That's it. You can create multiple notify services one for each user to notify.
 
If you want to implement the notification service using the "Shell Command Integration" or the "Command-line Notify" component, please check the old instructions here.
 

How to test the notification

You can easly test the new notification service using the Services Section available in the "Developer Tools"
Example:

Telegram Call Testing

Dedicated Telegram Bot for you and your Business

You can have your own dedicated bot to make the phone calls. 

These are the benefits of having your own bot:

  • Your own Telegram Username, Bio and Picture (Logo).
  • No delays. You will have your own queue.
  • Calls can be longer than 30 seconds
  • You can call to anybody without having the recipient to go through the authentication process. (Spam is not allowed)
  • Unlimited number of calls to unlimited recipients.

The cost of a dedicated instance is $15 per month. No setup fee if paid annually.

If you are interested, please contact me at [email protected]

Thank you!

Problems?

If you have problems, like not receiving the Call on Telegram, or not receiving the WhatsApp messages,  try to test the CallMeBot API using your Web Browser:

  • Telegram Phone Calls using Web Browser: here
  • Telegram Text Messages using Web Browsers: here
  • WhatsApp Text Messages using Web Browser: here

You might get some errors on the screen that will help you to identify the problem. (Ex: Calls disabled in the Telegram Security Settings, WhatsApp not activated, etc.)

If you still have problems using the API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected]. Remember to Follow me on Twitter to get news about coming features, changes, invitations, etc.