fixes for publish ha

This commit is contained in:
MichaelDvP
2021-03-06 18:52:45 +01:00
parent 6c07085d94
commit c120268409
3 changed files with 23 additions and 7 deletions

View File

@@ -392,7 +392,11 @@ void EMSESP::publish_all_loop() {
publish_sensor_values(true, true);
break;
case 7:
if (Mqtt::ha_enabled()) {
Mqtt::ha_status();
}
system_.send_heartbeat();
shower_.send_mqtt_stat(false, true);
break;
default:
// all finished
@@ -409,6 +413,7 @@ void EMSESP::reset_mqtt_ha() {
for (const auto & emsdevice : emsdevices) {
emsdevice->ha_config_done(false);
}
dallassensor_.reload();
}
// create json doc for the devices values and add to MQTT publish queue