mirror of https://github.com/home-assistant/core
Switch to using Client from twilio.rest rather than the deleted TwilioRestClient (#17883)
This commit is contained in:
parent
649bc55a3b
commit
d6e4208665
|
@ -32,12 +32,12 @@ CONFIG_SCHEMA = vol.Schema({
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
"""Set up the Twilio component."""
|
"""Set up the Twilio component."""
|
||||||
from twilio.rest import TwilioRestClient
|
from twilio.rest import Client
|
||||||
if DOMAIN not in config:
|
if DOMAIN not in config:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
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))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue