Migrate twilio webhooks to the webhook component#17715
Migrate twilio webhooks to the webhook component#17715balloob merged 5 commits intohome-assistant:devfrom
Conversation
tests/components/twilio/__init__.py
Outdated
d6fadeb to
f9c445f
Compare
f9c445f to
2675e2c
Compare
|
I rebased but it didn't pass tests. |
There was a problem hiding this comment.
Now that I think about it, we probably don't want to support the webhook id being set by the yaml config...
2675e2c to
5b7f3f5
Compare
|
Very strange, I'm able to reproduce locally, the error it's showing is Any idea why it wouldn't be finding the module? What's even more confusing is that it works fine when running Home Assistant and does in fact install the |
|
twilio needs to be part of the test requirements. Open |
|
Or better, don't add it to the list and mock it using |
tests/components/twilio/test_init.py
Outdated
| @@ -0,0 +1,41 @@ | |||
| """Test the init file of Twilio.""" | |||
| from unittest.mock import patch, Mock | |||
There was a problem hiding this comment.
'unittest.mock.Mock' imported but unused
|
@balloob @MartinHjelmare does this need a breaking change label? The breaking change paragraph is in the description. |
|
Added! |
Description:
Migrating Twilio over to the webhook API so that it doesn't need an api password.
This is built on top of #17464 (which needs to be merged before this one). Tests will not pass until after that is merged.
Breaking Change: Each instance of Home Assistant will now generate it's own unique webhook url for Twilio to use. One will need to be generated and provided to Twilio for incoming calls/messages from Twilio to Home Assistant to continue to flow.
I followed the approach used in #16817 to implement a new config flow to register the webhook. Existing configuration (
account_sid,auth_token) still occurs via the configuration.yaml file.I do not actually use twilio myself so I cannot test the behavior with Twilio, but the unit tests look okay.
Related issue (if applicable): Related to #15376
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7074
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: