minor text changes

This commit is contained in:
Proddy
2024-01-21 18:28:07 +01:00
parent 79d7142e5f
commit 2764185132
4 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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));

View File

@@ -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<std::string> 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);

View File

@@ -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);
}