2.1 KiB
2.1 KiB
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category | ha_release |
---|---|---|---|---|---|---|---|---|---|---|
page | Twilio SMS | Instructions how to add user notifications to Home Assistant. | 2016-05-14 14:14 | true | false | true | true | twilio.png | Notifications | 0.20 |
The Twilio notify platform enables sending notifications via SMS, powered by Twilio.
Configuration
# Example configuration.yaml entry
notify:
platform: twilio_sms
account_sid: ACCOUNT_SID_FROM_TWILIO
auth_token: AUTH_TOKEN_FROM_TWILIO
from_number: E164_PHONE_NUMBER
# Optional
name: NOTIFIER_NAME
Configuration variables:
- account_sid (Required): Your Twilio Account SID which can be found in your console. It starts with the letters
AC
. - auth_token (Required): Your Twilio Account SID which can be found in your console. It should be directly under where you found the
account_sid
. - from_number (Required): An E.164 formatted phone number, like +14151234567. See Twilio's guide to formatting phone numbers for more information.
- name (Optional): Setting the optional parameter
name
allows multiple notifiers to be created. The default value isnotify
. The notifier will bind to the servicenotify.NOTIFIER_NAME
.
Usage
Twilio is a notify platform and thus can be controlled by calling the notify service 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.
# Example automation notification entry
automation:
- alias: The sun has set
trigger:
platform: sun
event: sunset
action:
service: notify.twilio_sms
data:
message: 'The sun has set'
target:
- +14151234567
- +15105555555