无法弄清楚如何让 twilio API 在家庭助理中工作
Cannot figure out how to get the twilio API to work in home assistant
好的,所以我正在使用家庭助理在一天中的特定时间使用 twilio 自动向自己发送消息 api。
https://home-assistant.io/getting-started/troubleshooting-configuration/
这一切都在 configuration.yaml 文件中完成,所以这是我的样子:
notify:
- name: Cody Wirth
platform: twilio_sms
account_sid: AC8a4f2f40331bdad5c95265f2cefe26a2
auth_token: 33a693e18dcad513d4791c51f1071227
from_number: "+16142896777"
automation:
- alias: Send message at a given time
trigger:
platform: time
hours: 24
minutes: 47
seconds: 15
action:
service: notify.twilio_sms
data:
message: 'The sun has set'
target:
- "+16147059227"
我的语法有问题吗?是否需要在 Twilio 端配置一些内容才能使消息传送到我的 phone?当我自动发送消息时,什么也没有发生。
好的,这就是它 returns 的错误:
"17-01-12 08:17:44 WARNING (MainThread) [homeassistant.core] Unable to find service notify/twilio_sms"
要使用 twilio,您首先需要 enable/configure twilio 组件。
自动化不会配置或启动 twilio 组件,它只是使用它。
您可以在 twilio component page:
上找到配置文档
twilio:
account_sid: ACCOUNT_SID_FROM_TWILIO
auth_token: AUTH_TOKEN_FROM_TWILIO
在您配置它(并重新启动 home-assistant)之后,您的自动化应该能够通过它发送通知。
好的,所以我正在使用家庭助理在一天中的特定时间使用 twilio 自动向自己发送消息 api。
https://home-assistant.io/getting-started/troubleshooting-configuration/
这一切都在 configuration.yaml 文件中完成,所以这是我的样子:
notify:
- name: Cody Wirth
platform: twilio_sms
account_sid: AC8a4f2f40331bdad5c95265f2cefe26a2
auth_token: 33a693e18dcad513d4791c51f1071227
from_number: "+16142896777"
automation:
- alias: Send message at a given time
trigger:
platform: time
hours: 24
minutes: 47
seconds: 15
action:
service: notify.twilio_sms
data:
message: 'The sun has set'
target:
- "+16147059227"
我的语法有问题吗?是否需要在 Twilio 端配置一些内容才能使消息传送到我的 phone?当我自动发送消息时,什么也没有发生。
好的,这就是它 returns 的错误:
"17-01-12 08:17:44 WARNING (MainThread) [homeassistant.core] Unable to find service notify/twilio_sms"
要使用 twilio,您首先需要 enable/configure twilio 组件。 自动化不会配置或启动 twilio 组件,它只是使用它。
您可以在 twilio component page:
上找到配置文档twilio:
account_sid: ACCOUNT_SID_FROM_TWILIO
auth_token: AUTH_TOKEN_FROM_TWILIO
在您配置它(并重新启动 home-assistant)之后,您的自动化应该能够通过它发送通知。