Selaa lähdekoodia

changed time format for lastReceived MQTT output

FloKra 1 vuosi sitten
vanhempi
sitoutus
187be4a8af
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      cul2mqtt.py

+ 2 - 2
cul2mqtt.py

@@ -802,8 +802,8 @@ def cul_received(payload, source_cul):
         if debug:
             print("DEBUG: lastReceivedStatusFile not defined")
     
-    # send lastUpdate status to MQTT (for monitoring)
-    mqttc.publish(MQTT_Control_StateTopic + "/lastReceived", str(int(lastDataReceiveTime)), qos=0, retain=False)
+    # send lastReceived status to MQTT (for monitoring)
+    mqttc.publish(MQTT_Control_StateTopic + "/lastReceived", strftime("%Y-%m-%d %H:%M:%S", localtime()), qos=0, retain=False)
     
     if payload[:2] == 'is': # msg is reply from CUL to raw send command
         pass