From 2f66fec748bf0ce34596236fb6bc83ce0afbe249 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 8 Jul 2024 08:06:27 +0200 Subject: [PATCH] add CMD to api/mqtt to show it in ioBroker --- src/emsdevice.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 3153f94b1..1b527f988 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -519,7 +519,6 @@ void EMSdevice::add_device_value(int8_t tag, // to b uint32_t max // max allowed value ) { // initialize the device value depending on it's type - // ignoring DeviceValueType::CMD if (type == DeviceValueType::STRING) { *(char *)(value_p) = {'\0'}; // this is important for string functions like strlen() to work later @@ -1761,10 +1760,10 @@ bool EMSdevice::generate_values(JsonObject output, const int8_t tag_filter, cons } } - // commenting out as we don't want Commands in Console ('show values') - // else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::MQTT) { - // json[name] = ""; - // } + // we don't want Commands in Console ('show values') + else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::CONSOLE) { + json[name] = ""; + } // check for value outside min/max range and adapt the limits to avoid HA complains // Should this also check for api output?