Switch to using Client from twilio.rest rather than the deleted TwilioRestClient (#17885)

This commit is contained in:
Rohan Kapoor 2018-10-27 12:36:47 -07:00 committed by Paulus Schoutsen
parent dcf8aba150
commit a0d4595f78

View File

@ -34,9 +34,9 @@ CONFIG_SCHEMA = vol.Schema({
def setup(hass, config):
"""Set up the Twilio component."""
from twilio.rest import TwilioRestClient
from twilio.rest import Client
conf = config[DOMAIN]
hass.data[DATA_TWILIO] = TwilioRestClient(
hass.data[DATA_TWILIO] = Client(
conf.get(CONF_ACCOUNT_SID), conf.get(CONF_AUTH_TOKEN))
hass.http.register_view(TwilioReceiveDataView())
return True