mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix cmd HA-mqtt
This commit is contained in:
@@ -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<JsonArray>();
|
||||
if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) {
|
||||
// use index numbers
|
||||
|
||||
Reference in New Issue
Block a user