add device model - #2073

This commit is contained in:
proddy
2024-10-28 11:15:24 +01:00
parent 6e9bc2d47a
commit eed676f521
3 changed files with 84 additions and 87 deletions

View File

@@ -1982,9 +1982,14 @@ void EMSdevice::read_command(const uint16_t type_id, const uint8_t offset, const
// returns either default or custom name
std::string EMSdevice::name() {
if (custom_name_.empty()) {
return default_name_;
// return default name prefixed with a model if exists
if (model().empty()) {
return default_name();
}
return model() + "/" + default_name();
}
return custom_name_;
return custom_name();
}
// copy a raw value (i.e. without applying the numeric_operator) to the output buffer.