Fix: HASS exp_aft should be based on reachable threshold and poll interval
This commit is contained in:
parent
55e98bc068
commit
555b6c6750
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user