mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add CMD to api/mqtt to show it in ioBroker
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user