fix publish ha command

This commit is contained in:
MichaelDvP
2021-03-05 11:33:38 +01:00
committed by GitHub
parent c808f9715a
commit a3d9b7a364

View File

@@ -349,6 +349,7 @@ void EMSESP::show_sensor_values(uuid::console::Shell & shell) {
void EMSESP::publish_all(bool force) { void EMSESP::publish_all(bool force) {
if (force) { if (force) {
publish_all_idx_ = 1; publish_all_idx_ = 1;
reset_mqtt_ha();
return; return;
} }
if (Mqtt::connected()) { if (Mqtt::connected()) {
@@ -388,7 +389,7 @@ void EMSESP::publish_all_loop() {
publish_other_values(); publish_other_values();
break; break;
case 6: case 6:
publish_sensor_values(true); publish_sensor_values(true, true);
break; break;
case 7: case 7:
system_.send_heartbeat(); system_.send_heartbeat();