mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Switch to using Client from twilio.rest rather than the deleted TwilioRestClient (#17885)
This commit is contained in:
parent
dcf8aba150
commit
a0d4595f78
@ -34,9 +34,9 @@ CONFIG_SCHEMA = vol.Schema({
|
|||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Set up the Twilio component."""
|
"""Set up the Twilio component."""
|
||||||
from twilio.rest import TwilioRestClient
|
from twilio.rest import Client
|
||||||
conf = config[DOMAIN]
|
conf = config[DOMAIN]
|
||||||
hass.data[DATA_TWILIO] = TwilioRestClient(
|
hass.data[DATA_TWILIO] = Client(
|
||||||
conf.get(CONF_ACCOUNT_SID), conf.get(CONF_AUTH_TOKEN))
|
conf.get(CONF_ACCOUNT_SID), conf.get(CONF_AUTH_TOKEN))
|
||||||
hass.http.register_view(TwilioReceiveDataView())
|
hass.http.register_view(TwilioReceiveDataView())
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user