This script doesn't require your Home-Assistant to be configured with Pushbullet but it is highly recommended because then you can send notifications too, see Pushbullet component for more information.
For more information see the Pushbullet API documentation for SMS
To install download the script to <home-assistent>:/config/pushbullet_sms.sh
and make sure to make it executable (chmod +x pushbullet_sms.sh
).
$ cd /config && curl https://raw.githubusercontent.com/fondberg/hass_pushbullet_sms/master/pushbullet_sms.sh > pushbullet_sms.sh && chmod +x pushbullet_sms.sh
$ curl --header 'Access-Token: <your_access_token_here>' https://api.pushbullet.com/v2/devices | jq .
- Edit these variables in the script for your Pushbullet integration:
# Same as in the normal Hass.io integration
AUTH_TOKEN=''
# The Android device which has SMS integration on
TARGET_DEVICE_IDEN=''
# This seems it can be whatever but it is required
SOURCE_USER_IDEN='niklas'
# The numbers you want to send SMS to
NUMBERS=( "+46987654321" "+46123456798" )
- Add the script to your configuration
Add the script to
configuration.yaml
:
shell_command:
pushbullet_sms: bash /config/pushbullet_sms.sh "{{message}}"
Example automation
alias: Send pushbullet sms
trigger:
platform: sun
event: sunset
action:
- service: shell_command.pushbullet_sms
data:
message: "Sun has set"
MIT License - Copyright (c) 2019 Niklas Fondberg [email protected]