From 803b30ca11d8af678768d1b246f1a93c4defed86 Mon Sep 17 00:00:00 2001 From: Bernhard Kirchen Date: Sun, 10 Mar 2024 20:25:00 +0100 Subject: [PATCH] fix: wrong unit in battery HomeAssistent exp_aft the exp_aft value is in seconds. --- src/MqttHandleBatteryHass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MqttHandleBatteryHass.cpp b/src/MqttHandleBatteryHass.cpp index 7cad09222..8dc0b1cf6 100644 --- a/src/MqttHandleBatteryHass.cpp +++ b/src/MqttHandleBatteryHass.cpp @@ -156,7 +156,7 @@ void MqttHandleBatteryHassClass::publishSensor(const char* caption, const char* createDeviceInfo(deviceObj); if (Configuration.get().Mqtt.Hass.Expire) { - root["exp_aft"] = Battery.getStats()->getMqttFullPublishIntervalMs() * 3; + root["exp_aft"] = Battery.getStats()->getMqttFullPublishIntervalMs() / 1000 * 3; } if (deviceClass != NULL) { root["dev_cla"] = deviceClass;