rename snprintf_P to snprintf

This commit is contained in:
proddy
2021-09-19 21:27:39 +02:00
parent b214d7a662
commit ee34dd72f7
8 changed files with 63 additions and 63 deletions

View File

@@ -126,7 +126,7 @@ void Shower::send_mqtt_stat(bool state, bool force) {
ids.add("ems-esp");
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
snprintf_P(topic, sizeof(topic), "binary_sensor/%s/shower_active/config", Mqtt::base().c_str());
snprintf(topic, sizeof(topic), "binary_sensor/%s/shower_active/config", Mqtt::base().c_str());
Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag
}
}
@@ -161,7 +161,7 @@ void Shower::publish_values() {
// only publish shower duration if there is a value
if (duration_ > SHOWER_MIN_DURATION) {
char s[50];
snprintf_P(s, 50, "%d minutes and %d seconds", (uint8_t)(duration_ / 60000), (uint8_t)((duration_ / 1000) % 60));
snprintf(s, 50, "%d minutes and %d seconds", (uint8_t)(duration_ / 60000), (uint8_t)((duration_ / 1000) % 60));
doc["duration"] = s;
}