diff --git a/modules/socketio.py b/modules/socketio.py index c6f5759..d4f5e1a 100644 --- a/modules/socketio.py +++ b/modules/socketio.py @@ -13,7 +13,7 @@ def convert_datetimes(obj): elif isinstance(obj, list): return [convert_datetimes(i) for i in obj] elif isinstance(obj, datetime): - return obj.isoformat() + return obj.strftime("%d.%m.%Y %H:%M") else: return obj diff --git a/static/socketio.js b/static/socketio.js index 0c60348..01e0539 100644 --- a/static/socketio.js +++ b/static/socketio.js @@ -25,7 +25,7 @@ socket.on('static_data', (data) => { }else { gebId("beans-fill").parentElement.classList.remove("blink-orange"); } - if (esp_conn_infos.connection_valid) { + if (data.esp_conn_infos.connection_valid) { gebId("validButt").classList.add("deniePress"); gebId("infoMain").classList.remove("blink-orange"); gebId("machine-status-butt").classList.remove("deniePress");