Fixed datetime not serializable
This commit is contained in:
parent
5e5a685427
commit
445ad69236
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ hue_conf = {
|
|||
hue = PhilipsHue(hue_conf)
|
||||
counter = PeopleCounter(VL53L1XSensor())
|
||||
peopleCount = 0
|
||||
early_light_state = False
|
||||
early_light_state = False # TODO: Is probably redundant and can be implemented over peopleCount
|
||||
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
|
||||
|
@ -98,7 +98,7 @@ def change_cb(countChange: int, directionState: Dict):
|
|||
|
||||
try:
|
||||
with open(LOG_FILE_PATH, 'a') as f:
|
||||
f.write(json.dumps(data))
|
||||
f.write(json.dumps(data, default=str))
|
||||
except Exception as ex:
|
||||
logging.exception(f'Unable to write log file. {ex}')
|
||||
|
||||
|
|
Loading…
Reference in a new issue