Twilio SMS
The twilio_sms
notification platform enables sending notifications via SMS, powered by Twilio
The requirement is that you have setup Twilio.
Configuration
To use this notification platform in your installation, add the following to your configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file:
# Example configuration.yaml entry
notify:
- name: NOTIFIER_NAME
platform: twilio_sms
from_number: E164_PHONE_NUMBER or SENDER_ID
Configuration Variables
An E.164
Usage
Twilio is a notification platform and thus can be controlled by calling the notify action as described here. It will send a notification to all E.164 phone numbers in the notification target. See the notes above regarding the from_number
configuration variable for information about formatting phone numbers. It’s also possible to use whatsapp:+123456789
for sending notifications to a Whatsapp user.
Media can be included with messages by setting the optional media_url
variable. Only .gif
, .png
, or .jpeg
content are supported, according to the Twilio documentation and this feature is only supported in the US and Canada.
# Example automation notification entry
automation:
- alias: "The sun has set"
triggers:
- trigger: sun
event: sunset
actions:
- action: notify.twilio_sms
data:
message: "The sun has set"
target:
- '+14151234567'
- '+15105555555'
data:
media_url:
- "https://www.home-assistant.io/images/supported_brands/home-assistant.png"