minor tidyups

This commit is contained in:
proddy
2021-03-22 09:23:57 +01:00
parent c660440996
commit 355b71cacf
6 changed files with 7 additions and 10 deletions

View File

@@ -114,7 +114,7 @@ void Shower::send_mqtt_stat(bool state, bool force) {
JsonArray ids = dev.createNestedArray("ids");
ids.add("ems-esp");
char topic[100];
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
snprintf_P(topic, sizeof(topic), PSTR("homeassistant/binary_sensor/%s/shower_active/config"), Mqtt::base().c_str());
Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag
}