diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e1da56db..af5bc5c7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -236,7 +236,7 @@ There are breaking changes between 3.5.x and earlier versions of 3.6.0. Please r - fix Table resizing in WebUI [#519](https://github.com/emsesp/EMS-ESP32/issues/519) - allow larger customization files [#570](https://github.com/emsesp/EMS-ESP32/issues/570) -- losing entitiy wwcomfort [#581](https://github.com/emsesp/EMS-ESP32/issues/581) +- losing entity wwcomfort [#581](https://github.com/emsesp/EMS-ESP32/issues/581) ## Changed diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index fce90371d..60cbe4e9c 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -642,6 +642,7 @@ bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int if (sensors_.empty()) { return true; } + // make a copy of the string command for parsing char command_s[30]; strlcpy(command_s, cmd, sizeof(command_s)); diff --git a/src/command.cpp b/src/command.cpp index 2724ff75e..ee16a9bb6 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -302,6 +302,7 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char * // check if its a call to an end-point of a device // this is used to fetch the attributes of the device entity, or call a command directly + // for example info, values, commands, etc bool single_command = (!value || !strlen(value)); if (single_command) { // exception 1: anything that is from System @@ -474,7 +475,7 @@ void Command::show(uuid::console::Shell & shell, uint8_t device_type, bool verbo return; } - // create a list of commands, sort them + // create list of command, and sort std::list sorted_cmds; for (const auto & cf : cmdfunctions_) { if ((cf.device_type_ == device_type) && !cf.has_flags(CommandFlag::HIDDEN)) { @@ -483,7 +484,7 @@ void Command::show(uuid::console::Shell & shell, uint8_t device_type, bool verbo } sorted_cmds.sort(); - // if not in verbose mode, just print them on a single line + // if not in verbose mode, just print them on a single line and exit if (!verbose) { for (const auto & cl : sorted_cmds) { shell.print(cl); @@ -615,6 +616,7 @@ void Command::show_all(uuid::console::Shell & shell) { shell.print(COLOR_YELLOW); shell.printf(" %s: ", EMSdevice::device_type_2_device_name(EMSdevice::DeviceType::CUSTOM)); shell.println(COLOR_RESET); + // TODO to remove later? shell.printf(" info:\t\t\t\t%slists all values %s*", COLOR_BRIGHT_CYAN, COLOR_BRIGHT_GREEN); shell.println(COLOR_RESET); shell.printf(" commands:\t\t\t%slists all commands %s*", COLOR_BRIGHT_CYAN, COLOR_BRIGHT_GREEN); @@ -626,6 +628,7 @@ void Command::show_all(uuid::console::Shell & shell) { shell.print(COLOR_YELLOW); shell.printf(" %s: ", EMSdevice::device_type_2_device_name(EMSdevice::DeviceType::SCHEDULER)); shell.println(COLOR_RESET); + // TODO to remove later? shell.printf(" info:\t\t\t\t%slists all values %s*", COLOR_BRIGHT_CYAN, COLOR_BRIGHT_GREEN); shell.println(COLOR_RESET); shell.printf(" commands:\t\t\t%slists all commands %s*", COLOR_BRIGHT_CYAN, COLOR_BRIGHT_GREEN); diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 5d79f1790..75ce6a14f 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -685,7 +685,7 @@ bool EMSESP::get_device_value_info(JsonObject root, const char * cmd, const int8 return EMSESP::webSchedulerService.get_value_info(root, cmd); } - // own entities + // custom entities if (devicetype == DeviceType::CUSTOM) { return EMSESP::webCustomEntityService.get_value_info(root, cmd); }