Browse Source

[cli] set_last_update uniquement à la fin de supervise

Maxime Alves LIRMM@home 3 years ago
parent
commit
9bc11574d2
1 changed files with 0 additions and 2 deletions
  1. 0
    2
      pyheatpump/cli.py

+ 0
- 2
pyheatpump/cli.py View File

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
-

Loading…
Cancel
Save