This commit is contained in:
Evgeny Zinoviev 2021-03-23 04:35:22 +03:00
parent 00f523ab50
commit e006bdd608

View File

@ -31,6 +31,7 @@ def sms_handler(sms: SMS, api: WebAPI):
elif text == 'yo, get me some status': elif text == 'yo, get me some status':
print('gathering status') print('gathering status')
api.auth()
info = api.device_information() info = api.device_information()
signal = api.device_signal() signal = api.device_signal()
buf = [] buf = []
@ -46,6 +47,7 @@ def sms_handler(sms: SMS, api: WebAPI):
buf = ' '.join(buf) buf = ' '.join(buf)
if buf != '': if buf != '':
print('going to send this: ' + buf) print('going to send this: ' + buf)
api.auth()
api.send_sms(phone=trusted_phone, content=buf) api.send_sms(phone=trusted_phone, content=buf)
elif text == 'switch it off': elif text == 'switch it off':