mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-27 00:59:10 +03:00
remove PSTR()
This commit is contained in:
@@ -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), PSTR("binary_sensor/%s/shower_active/config"), Mqtt::base().c_str());
|
||||
snprintf_P(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, PSTR("%d minutes and %d seconds"), (uint8_t)(duration_ / 60000), (uint8_t)((duration_ / 1000) % 60));
|
||||
snprintf_P(s, 50, "%d minutes and %d seconds", (uint8_t)(duration_ / 60000), (uint8_t)((duration_ / 1000) % 60));
|
||||
doc["duration"] = s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user