mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
no need to add uique id to end of device type since it's unique anyway
This commit is contained in:
@@ -175,6 +175,8 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
|
|||||||
obj["s"] = emsdevice->device_type_name() + " (" + emsdevice->name() + ")"; // shortname
|
obj["s"] = emsdevice->device_type_name() + " (" + emsdevice->name() + ")"; // shortname
|
||||||
|
|
||||||
// device type name. We may have one than one (e.g. multiple thermostats) so postfix name with index
|
// device type name. We may have one than one (e.g. multiple thermostats) so postfix name with index
|
||||||
|
// code block not needed - see https://github.com/emsesp/EMS-ESP32/pull/586#issuecomment-1193779668
|
||||||
|
/*
|
||||||
uint8_t device_index = EMSESP::device_index(emsdevice->device_type(), emsdevice->unique_id());
|
uint8_t device_index = EMSESP::device_index(emsdevice->device_type(), emsdevice->unique_id());
|
||||||
if (device_index) {
|
if (device_index) {
|
||||||
char s[10];
|
char s[10];
|
||||||
@@ -182,6 +184,8 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
|
|||||||
} else {
|
} else {
|
||||||
obj["t"] = Helpers::toLower(emsdevice->device_type_name());
|
obj["t"] = Helpers::toLower(emsdevice->device_type_name());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
obj["t"] = Helpers::toLower(emsdevice->device_type_name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user