mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
don't include type in name of device (in customization list)
This commit is contained in:
@@ -163,10 +163,10 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
|
|||||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||||
if (emsdevice->has_entities()) {
|
if (emsdevice->has_entities()) {
|
||||||
JsonObject obj = devices.add<JsonObject>();
|
JsonObject obj = devices.add<JsonObject>();
|
||||||
obj["i"] = emsdevice->unique_id(); // its unique id
|
obj["i"] = emsdevice->unique_id(); // its unique id
|
||||||
obj["s"] = std::string(emsdevice->device_type_2_device_name_translated()) + " (" + emsdevice->name() + ")"; // shortname, is device type translated
|
obj["s"] = emsdevice->name();
|
||||||
obj["tn"] = emsdevice->device_type_name(); // non-translated, lower-case
|
obj["tn"] = emsdevice->device_type_name(); // non-translated, lower-case
|
||||||
obj["t"] = emsdevice->device_type(); // internal device type ID
|
obj["t"] = emsdevice->device_type(); // internal device type ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user