mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
merge PR 940 - https://github.com/emsesp/EMS-ESP32/pull/940
This commit is contained in:
@@ -379,4 +379,12 @@ std::string DeviceValue::get_fullname() const {
|
||||
return customname;
|
||||
}
|
||||
|
||||
std::string DeviceValue::get_name(std::string & entity) {
|
||||
auto pos = entity.find('|');
|
||||
if (pos != std::string::npos) {
|
||||
return entity.substr(2, pos - 2);
|
||||
}
|
||||
return entity.substr(2);
|
||||
}
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
Reference in New Issue
Block a user