From ba3df3e3df7ed26dc8d3ba5cdb39960293b68b1f Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 6 Jul 2024 17:55:06 +0200 Subject: [PATCH] fix cmd HA-mqtt --- src/mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index e912bcacc..ad2ab8457 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -1019,7 +1019,7 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev doc["cmd_t"] = command_topic; // extend for enums and also commands, add options - if ((type == DeviceValueType::ENUM) || (type == DeviceValueType::CMD)) { + if ((type == DeviceValueType::ENUM) || (type == DeviceValueType::CMD && uom == DeviceValueUOM::NONE)) { JsonArray option_list = doc["ops"].to(); if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) { // use index numbers