always show on/off in console and web (only boolean format in MQTT)

This commit is contained in:
proddy
2021-02-27 15:23:29 +01:00
parent 513fab307e
commit 555fd94ea7
3 changed files with 12 additions and 81 deletions

View File

@@ -308,7 +308,8 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
shell.print(Helpers::render_value(s, (float)data.as<float>(), 1));
} else if (data.is<bool>()) {
char s[10];
shell.print(Helpers::render_boolean(s, data.as<bool>()));
// shell.print(Helpers::render_boolean(s, data.as<bool>()));
shell.print(data.as<bool>() ? F_(on) : F_(off));
}
// if there is a uom print it
@@ -1100,7 +1101,7 @@ void EMSESP::loop() {
fetch_device_values();
}
delay(1); // helps telnet catch up
// delay(1); // helps telnet catch up. don't think its needed in ESP32 3.1.0
}
} // namespace emsesp