use publish_ha() for HA config topics

This commit is contained in:
proddy
2020-11-29 21:06:43 +01:00
parent 561803dd7e
commit d840c61af3
7 changed files with 11 additions and 10 deletions

View File

@@ -103,7 +103,7 @@ void Boiler::register_mqtt_ha_config() {
dev["mdl"] = name();
JsonArray ids = dev.createNestedArray("ids");
ids.add("ems-esp-boiler");
Mqtt::publish_retain(F("homeassistant/sensor/ems-esp/boiler/config"), doc.as<JsonObject>(), true); // publish the config payload with retain flag
Mqtt::publish_ha(F("homeassistant/sensor/ems-esp/boiler/config"), doc.as<JsonObject>()); // publish the config payload with retain flag
Mqtt::register_mqtt_ha_binary_sensor(F_(tapwaterActive), device_type(), "tapwater_active");
Mqtt::register_mqtt_ha_binary_sensor(F_(heatingActive), device_type(), "heating_active");