mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -1130,7 +1130,7 @@ void EMSdevice::dump_value_info() {
|
||||
if (dv.fullname != nullptr) {
|
||||
Serial.print(name_);
|
||||
Serial.print(',');
|
||||
Serial.print(device_type_name().c_str());
|
||||
Serial.print(device_type_name());
|
||||
Serial.print(',');
|
||||
|
||||
Serial.print(product_id_);
|
||||
@@ -1546,10 +1546,7 @@ bool EMSdevice::generate_values(JsonObject & output, const uint8_t tag_filter, c
|
||||
if (dv.type == DeviceValueType::BOOL && Helpers::hasValue(*(uint8_t *)(dv.value_p), EMS_VALUE_BOOL)) {
|
||||
// see how to render the value depending on the setting
|
||||
auto value_b = (bool)*(uint8_t *)(dv.value_p);
|
||||
if (Mqtt::ha_enabled() && (output_target == OUTPUT_TARGET::MQTT)) {
|
||||
char s[12];
|
||||
json[name] = Helpers::render_boolean(s, value_b); // for HA always render as string
|
||||
} else if (output_target == OUTPUT_TARGET::CONSOLE) {
|
||||
if (output_target == OUTPUT_TARGET::CONSOLE) {
|
||||
char s[12];
|
||||
json[name] = Helpers::render_boolean(s, value_b, true); // console use web settings
|
||||
} else if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) {
|
||||
|
||||
Reference in New Issue
Block a user