Fix #92: Expiration time depends on the amount of inverters
This commit is contained in:
parent
c7448d460a
commit
dbf692d90b
@ -116,7 +116,7 @@ void MqttHassPublishingClass::publishField(std::shared_ptr<InverterAbstract> inv
|
|||||||
root[F("unit_of_meas")] = inv->Statistics()->getChannelFieldUnit(channel, fieldType.fieldId);
|
root[F("unit_of_meas")] = inv->Statistics()->getChannelFieldUnit(channel, fieldType.fieldId);
|
||||||
root[F("uniq_id")] = String(serial) + "_ch" + String(channel) + "_" + fieldName;
|
root[F("uniq_id")] = String(serial) + "_ch" + String(channel) + "_" + fieldName;
|
||||||
root[F("dev")] = deviceObj;
|
root[F("dev")] = deviceObj;
|
||||||
root[F("exp_aft")] = Configuration.get().Mqtt_PublishInterval * 2;
|
root[F("exp_aft")] = Hoymiles.getNumInverters() * Configuration.get().Mqtt_PublishInterval * 2;
|
||||||
if (devCls != 0) {
|
if (devCls != 0) {
|
||||||
root[F("dev_cla")] = devCls;
|
root[F("dev_cla")] = devCls;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user