Fixed uptime rollower in MQTT raw mode

This commit is contained in:
Gunnar Skjold 2023-09-12 18:58:25 +02:00
parent b76efc42db
commit 40215ee746

View File

@ -267,7 +267,7 @@ bool RawMqttHandler::publishSystem(HwTools* hw, EntsoeApi* eapi, EnergyAccountin
return false;
mqtt->publish(topic + "/id", WiFi.macAddress(), true, 0);
mqtt->publish(topic + "/uptime", String((unsigned long) millis64()/1000));
mqtt->publish(topic + "/uptime", String((uint32_t) (millis64()/1000)));
float vcc = hw->getVcc();
if(vcc > 0) {
mqtt->publish(topic + "/vcc", String(vcc, 2));