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 diff --git a/src/version.h b/src/version.h index af68b2d00..bf4a09346 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.7.0-dev.22" +#define EMSESP_APP_VERSION "3.7.0-dev.23" diff --git a/src/web/WebCustomizationService.cpp b/src/web/WebCustomizationService.cpp index 0b0dd5e1e..d7eb6e8dc 100644 --- a/src/web/WebCustomizationService.cpp +++ b/src/web/WebCustomizationService.cpp @@ -134,7 +134,7 @@ StateUpdateResult WebCustomization::update(JsonObject root, WebCustomization & c auto emsEntity = EntityCustomization(); emsEntity.product_id = masked_entities["product_id"]; emsEntity.device_id = masked_entities["device_id"]; - emsEntity.custom_name = masked_entities["custom_name"].as(); + emsEntity.custom_name = masked_entities["custom_name"] | ""; for (const JsonVariant masked_entity_id : masked_entities["entity_ids"].as()) { if (masked_entity_id.is()) {