Skip to content

Commit

Permalink
no need to add uique id to end of device type since it's unique anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Jul 25, 2022
1 parent cdc04f9 commit a3a2913
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/web/WebCustomizationService.cpp
Expand Up @@ -175,13 +175,17 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
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
// 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());
if (device_index) {
char s[10];
obj["t"] = Helpers::toLower(emsdevice->device_type_name()) + Helpers::smallitoa(s, device_index);
} else {
obj["t"] = Helpers::toLower(emsdevice->device_type_name());
}
*/
obj["t"] = Helpers::toLower(emsdevice->device_type_name());
}
}

Expand Down

0 comments on commit a3a2913

Please sign in to comment.