mrrcomp
(Mrrcomp)
January 31, 2025, 3:18am
1
HI
I am attempting to setup Twilio to send an sms inside of an automation …
I have intalled the twilio integration that told me to setup a webhook in the twilio account which i did.
I added the following to configuration.yaml
notify:
- name: twilio_sma
platform: twilio_sms
from_number: "phone number from twilio"
The automation i created in yaml
alias: SMS Send
description: ''
triggers:
- type: changed_states
device_id: 5c7059377f8a14ab716e735bc4259060
entity_id: cf2a11b2d7b696e0738aaede2a8457a0
domain: switch
trigger: device
for:
hours: 0
minutes: 0
seconds: 5
conditions: []
actions:
- action: notify.twilio_sms
metadata: {}
data:
message: heater switched
title: 'heater test '
target: +972-50-3440135
data: the heater switched
mode: single
I don’t get any error but the sms is not being sent… Is the problem on the HA end or the twilio end?
Regards
Mrrcomp
Have you checked the automation trace and logs for any errors?
mrrcomp
(Mrrcomp)
January 31, 2025, 4:56am
3
@parautenbach thanks for the response…
The trace gives me the following
Stopped because an error was encountered at January 31, 2025 at 6:31:38 AM (runtime: 0.03 seconds)
expected dict for dictionary value @ data[‘data’]
Remove the second data:
line. I’m not using twilio, but according to the docs it shouldn’t be there. That’s also what the error is saying: there’s an unexpected data
under data
.
Lets say you have this error:
Logger: homeassistant.config
Source: config.py:464
First occurred: 16:28:21 (1 occurrences)
Last logged: 16:28:21
Invalid config for [script]: not a valid value for dictionary value @ data['sequence'][1]['repeat']['sequence'][7]['entity_id']. Got None. (See /config/configuration.yaml, line 206).
And that line 207 (we look for line 207, not line 206 because lists start counting at 0, but your text editor line numbers start counting at 1) is:
script: !include scri…
mrrcomp
(Mrrcomp)
January 31, 2025, 5:11am
5
@parautenbach thanks
I did manage now to run the automation without error but i dont get and sms and i dont see any mention of an error or a message getting to the twilio console and the
Looks like your message got cut off.
If you say “without error”, do you mean there was no error in the trace? Did you check the actual HA log too?
mrrcomp
(Mrrcomp)
January 31, 2025, 10:45am
7
@parautenbach
Correct trace no longer giving error.TBH not sure; how to see /he HA log