Skip to content

Commit

Permalink
fix: wrong unit in battery HomeAssistent exp_aft
Browse files Browse the repository at this point in the history
the exp_aft value is in seconds.
  • Loading branch information
schlimmchen committed Mar 10, 2024
1 parent 19859ed commit 803b30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MqttHandleBatteryHass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 803b30c

Please sign in to comment.