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

This commit is contained in:
Rohan Kapoor 2018-10-27 12:37:07 -07:00 committed by Paulus Schoutsen
parent 649bc55a3b
commit d6e4208665
1 changed files with 2 additions and 2 deletions

View File

@ -32,12 +32,12 @@ CONFIG_SCHEMA = vol.Schema({
async def async_setup(hass, config):
"""Set up the Twilio component."""
from twilio.rest import TwilioRestClient
from twilio.rest import Client
if DOMAIN not in config:
return True
conf = config[DOMAIN]
hass.data[DATA_TWILIO] = TwilioRestClient(
hass.data[DATA_TWILIO] = Client(
conf.get(CONF_ACCOUNT_SID), conf.get(CONF_AUTH_TOKEN))
return True