From d2a1d65ca25880e6a8039d7dfa2eab5d79efea21 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 25 Oct 2020 18:30:23 +0100 Subject: [PATCH] don't show commands for a device if it doesn't have any --- src/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.cpp b/src/command.cpp index 6e8c5ad5c..d5abec3d4 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -146,7 +146,7 @@ void Command::show_devices(uuid::console::Shell & shell) { for (const auto & device_class : EMSFactory::device_handlers()) { for (const auto & emsdevice : EMSESP::emsdevices) { - if ((emsdevice) && (emsdevice->device_type() == device_class.first)) { + if ((emsdevice) && (emsdevice->device_type() == device_class.first) && (device_has_commands(device_class.first))) { shell.printf("%s ", EMSdevice::device_type_2_device_name(device_class.first).c_str()); break; // we only want to show one (not multiple of the same device types) }