|
|
|
|
199
|
control_data = get_resp.json()
|
199
|
control_data = get_resp.json()
|
200
|
if Heatpump(mac_address).control(control_data):
|
200
|
if Heatpump(mac_address).control(control_data):
|
201
|
logger.info('GET to supervisor succeded : updated values')
|
201
|
logger.info('GET to supervisor succeded : updated values')
|
202
|
- set_last_update(int(datetime.now().strftime('%s')))
|
|
|
203
|
else:
|
202
|
else:
|
204
|
logger.warn('Unable to set data from supervisor\n{}'.format(control_data))
|
203
|
logger.warn('Unable to set data from supervisor\n{}'.format(control_data))
|
205
|
|
204
|
|
|
|
|
|
237
|
logger.info('POST to supervisor failed')
|
236
|
logger.info('POST to supervisor failed')
|
238
|
|
237
|
|
239
|
set_last_update(int(datetime.now().strftime('%s')))
|
238
|
set_last_update(int(datetime.now().strftime('%s')))
|
240
|
-
|
|
|