small change

This commit is contained in:
Proddy
2023-01-03 15:00:04 +01:00
parent 5c6d6da4f9
commit cfce36c212

View File

@@ -354,8 +354,7 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
// do this in the order of factory classes to keep a consistent order when displaying // do this in the order of factory classes to keep a consistent order when displaying
for (const auto & device_class : EMSFactory::device_handlers()) { for (const auto & device_class : EMSFactory::device_handlers()) {
for (const auto & emsdevice : emsdevices) { for (const auto & emsdevice : emsdevices) {
auto device_type = emsdevice->device_type(); if (emsdevice && (emsdevice->device_type() == device_class.first)) {
if (emsdevice && (device_type == device_class.first)) {
// print header, with device type translated // print header, with device type translated
shell.printfln("%s: %s (%d)", emsdevice->device_type_2_device_name_translated(), emsdevice->to_string().c_str(), emsdevice->count_entities()); shell.printfln("%s: %s (%d)", emsdevice->device_type_2_device_name_translated(), emsdevice->to_string().c_str(), emsdevice->count_entities());