translated tags

This commit is contained in:
MichaelDvP
2022-10-10 16:55:00 +02:00
parent 6fd3e567cd
commit 13890d2835
6 changed files with 141 additions and 137 deletions

View File

@@ -365,7 +365,11 @@ bool Command::list(const uint8_t device_type, JsonObject & output) {
for (const auto & cl : sorted_cmds) {
for (const auto & cf : cmdfunctions_) {
if ((cf.device_type_ == device_type) && !cf.has_flags(CommandFlag::HIDDEN) && cf.description_ && (cl == std::string(cf.cmd_))) {
output[cl] = Helpers::translated_fullname(cf.description_);
if (cf.has_flags(CommandFlag::MQTT_SUB_FLAG_WW)) {
output[cl] = EMSdevice::tag_to_string(DeviceValueTAG::TAG_DEVICE_DATA_WW) + " " + Helpers::translated_fullname(cf.description_);
} else {
output[cl] = Helpers::translated_fullname(cf.description_);
}
}
}
}