Heures erronées dans phone_detectiond.py et non passage en présent

Bonjour

j’ai installé le plugin hier…
En faisant des tests je me suis aperçu que le plugin passait bien en absent mais l’etat restait quand même a 1
En regardant le log je me suis aperçu d’une incohérence dans les heures affichées:

[2020-06-17 15:18:12][DEBUG][root](Thread-2) : lastStateDate: 2020-06-17 15:14:42
[2020-06-17 15:18:12][DEBUG][root](Thread-2) : thresholdDate: 2020-06-17 15:15:42
[2020-06-17 15:18:12][DEBUG][root](Thread-2) : **datetime.utcnow()**: 2020-06-17 13:18:12.818355
[2020-06-17 15:18:12][DEBUG][root](Thread-2) : is **datetime.utcnow()** > thresholdDate ? False

datetime.utcnow?? donc heure locale - 2h :thinking:
J’ai replacé datetime.utcnow par datetime.today dans phone_detectiond.py et pour moi maintenant c’est Ok :slightly_smiling_face:

[2020-06-17 16:26:37][DEBUG][root](Thread-2) : **Smartphone-PM status has changed to 'present'! Notify Jeedom.**
[2020-06-17 16:26:37][DEBUG][root](Thread-2) : device status: True
[2020-06-17 16:26:37][DEBUG][root](Thread-2) : **Send to jeedom :  {'action': 'update_device_status', 'id': 1042, 'value': 1}**
[2020-06-17 16:26:37][DEBUG] : id: 1042
[2020-06-17 16:26:37][DEBUG] : value: 1
[2020-06-17 16:26:37][DEBUG] : Device Name: [BT_Cluses][Smartphone-PM]
[2020-06-17 16:26:37][DEBUG] : State property name: [BT_Cluses][Smartphone-PM][Etat]
[2020-06-17 16:26:37][INFO] : updateGlobalDevice()
[2020-06-17 16:26:37][DEBUG][root](Thread-2) : Status Code :  200
[2020-06-17 16:26:37][DEBUG][root](Thread-2) : Jeedom reply :  {'success': True, 'value': 1}
[2020-06-17 16:26:39][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:26:40][DEBUG][root](Thread-2) : 1042 is present
[2020-06-17 16:26:40][DEBUG][root](Thread-2) : 1042 is up to date
[2020-06-17 16:26:42][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:26:43][DEBUG][root](Thread-2) : 1042 is present
[2020-06-17 16:26:43][DEBUG][root](Thread-2) : 1042 is up to date
[2020-06-17 16:26:45][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:26:47][DEBUG][root](Thread-2) : 1042 is present
[2020-06-17 16:26:47][DEBUG][root](Thread-2) : 1042 is up to date
[2020-06-17 16:26:49][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : 1042 is absent
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : lastStateDate: 2020-06-17 16:26:47.612466
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : thresholdDate: 2020-06-17 16:27:07.612466
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : datetime.today(): 2020-06-17 16:26:54.811443
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : is datetime.today() > thresholdDate ? False
[2020-06-17 16:26:54][DEBUG][root](Thread-2) : 1042 is up to date
[2020-06-17 16:26:56][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : 1042 is absent
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : lastStateDate: 2020-06-17 16:26:47.612466
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : thresholdDate: 2020-06-17 16:27:07.612466
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : datetime.today(): 2020-06-17 16:27:02.017746
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : is datetime.today() > thresholdDate ? False
[2020-06-17 16:27:02][DEBUG][root](Thread-2) : 1042 is up to date
[2020-06-17 16:27:04][DEBUG][root](Thread-2) : Get phone information 1042
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : 1042 is absent
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : lastStateDate: 2020-06-17 16:26:47.612466
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : thresholdDate: 2020-06-17 16:27:07.612466
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : datetime.today(): 2020-06-17 16:27:09.234790
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : is datetime.today() > thresholdDate ? True
[2020-06-17 16:27:09][INFO][root](Thread-2) : Set "Smartphone-PM" phone absent
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : 1042 must be update
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : **Smartphone-PM status has changed to 'absent'! Notify Jeedom.**
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : device status: False
[2020-06-17 16:27:09][DEBUG][root](Thread-2) : Send to jeedom :  {'action': 'update_device_status', 'id': 1042, 'value': 0}
2 « J'aime »