add comments

This commit is contained in:
proddy
2026-05-15 13:05:43 +02:00
parent 68e14875b3
commit a39626bb0e
2 changed files with 4 additions and 5 deletions

View File

@@ -587,7 +587,7 @@ void EMSESP::publish_all(bool force) {
publish_other_values(); // switch and heat pump, ...
publish_sensor_values(true); // includes temperature and analog sensors
system_.send_heartbeat();
system_.send_heartbeat(); // send MQTT heartbeat topic
}
}
@@ -628,7 +628,7 @@ void EMSESP::publish_all_loop() {
if (Mqtt::ha_enabled()) {
Mqtt::ha_status();
}
system_.send_heartbeat();
system_.send_heartbeat(); // send MQTT heartbeat topic
break;
default:
// all finished

View File

@@ -131,10 +131,10 @@ void Mqtt::loop() {
uint32_t currentMillis = uuid::get_uptime();
// send heartbeat
// send heartbeat per the frequency in the MQTT settings
if (currentMillis - last_publish_heartbeat_ > publish_time_heartbeat_) {
last_publish_heartbeat_ = currentMillis;
EMSESP::system_.send_heartbeat(); // send heartbeat
EMSESP::system_.send_heartbeat(); // send MQTT heartbeat topic
}
// temperature and analog sensor publish on change
@@ -511,7 +511,6 @@ void Mqtt::on_connect() {
// send initial MQTT messages for some of our services
EMSESP::system_.send_heartbeat(); // send heartbeat
// for publish on change publish the initial complete list
EMSESP::webCustomEntityService.publish(true);
EMSESP::webSchedulerService.publish(true);
EMSESP::analogsensor_.publish_values(true);