Skip to content

Commit

Permalink
Fix: HASS exp_aft should be based on reachable threshold and poll int…
Browse files Browse the repository at this point in the history
…erval
  • Loading branch information
tbnobody committed Sep 11, 2023
1 parent 55e98bc commit 555b6c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MqttHandleHass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void MqttHandleHassClass::publishField(std::shared_ptr<InverterAbstract> inv, Ch
createDeviceInfo(deviceObj, inv);

if (Configuration.get().Mqtt_Hass_Expire) {
root["exp_aft"] = Hoymiles.getNumInverters() * Configuration.get().Mqtt_PublishInterval * 3;
root["exp_aft"] = Hoymiles.getNumInverters() * max<uint32_t>(Hoymiles.PollInterval(), Configuration.get().Mqtt_PublishInterval) * inv->getReachableThreshold();
}
if (devCls != 0) {
root["dev_cla"] = devCls;
Expand Down

0 comments on commit 555b6c6

Please sign in to comment.