add CMD to api/mqtt to show it in ioBroker

This commit is contained in:
MichaelDvP
2024-07-08 08:06:27 +02:00
parent 611f02f81b
commit 2f66fec748

View File

@@ -519,7 +519,6 @@ void EMSdevice::add_device_value(int8_t tag, // to b
uint32_t max // max allowed value uint32_t max // max allowed value
) { ) {
// initialize the device value depending on it's type // initialize the device value depending on it's type
// ignoring DeviceValueType::CMD
if (type == DeviceValueType::STRING) { if (type == DeviceValueType::STRING) {
*(char *)(value_p) = {'\0'}; // this is important for string functions like strlen() to work later *(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') // we don't want Commands in Console ('show values')
// else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::MQTT) { else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::CONSOLE) {
// json[name] = ""; json[name] = "";
// } }
// check for value outside min/max range and adapt the limits to avoid HA complains // check for value outside min/max range and adapt the limits to avoid HA complains
// Should this also check for api output? // Should this also check for api output?