smal fixes

This commit is contained in:
MichaelDvP
2025-12-12 10:47:06 +01:00
parent d96c3f3ed7
commit ad3049ab0a
2 changed files with 2 additions and 7 deletions

View File

@@ -29,13 +29,8 @@ static_assert(uuid::console::thread_safe, "uuid-console must be thread-safe");
namespace emsesp {
// Static member definitions
#ifndef EMSESP_STANDALONE
std::vector<std::unique_ptr<EMSdevice>, AllocatorPSRAM<std::unique_ptr<EMSdevice>>> EMSESP::emsdevices{};
std::vector<EMSESP::Device_record, AllocatorPSRAM<EMSESP::Device_record>> EMSESP::device_library_;
#else
std::vector<std::unique_ptr<EMSdevice>> EMSESP::emsdevices{};
std::vector<EMSESP::Device_record> EMSESP::device_library_;
#endif
uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN};
uint16_t EMSESP::watch_id_ = WATCH_ID_NONE;

View File

@@ -64,7 +64,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject root) {
si["time"] = scheduleItem.flags != SCHEDULEFLAG_SCHEDULE_IMMEDIATE ? scheduleItem.time : "";
si["cmd"] = scheduleItem.cmd;
si["value"] = scheduleItem.value;
si["name"] = scheduleItem.name;
si["name"] = (const char *)scheduleItem.name;
}
}
@@ -264,7 +264,7 @@ void WebSchedulerService::publish(const bool force) {
snprintf(uniq_s, sizeof(uniq_s), "%s_%s", F_(scheduler), scheduleItem.name);
config["uniq_id"] = uniq_s;
config["name"] = scheduleItem.name;
config["name"] = (const char *)scheduleItem.name;
config["def_ent_id"] = std::string("switch.") + uniq_s;
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];