mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
commands like reset can't be renamed. use translated name for commands like these.
This commit is contained in:
@@ -956,13 +956,14 @@ void EMSdevice::generate_values_web_customization(JsonArray & output) {
|
||||
obj["n"] = name;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
obj["n"] = "";
|
||||
}
|
||||
|
||||
// add the custom name, is optional
|
||||
if (!dv.custom_fullname.empty()) {
|
||||
obj["cn"] = dv.custom_fullname;
|
||||
// add the custom name, is optional
|
||||
if (!dv.custom_fullname.empty()) {
|
||||
obj["cn"] = dv.custom_fullname;
|
||||
}
|
||||
} else {
|
||||
// it's a command
|
||||
obj["n"] = "!" + fullname; // prefix ! to fullname for commands
|
||||
}
|
||||
|
||||
obj["m"] = dv.state >> 4; // send back the mask state. We're only interested in the high nibble
|
||||
|
||||
Reference in New Issue
Block a user