mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
auto formatting
This commit is contained in:
@@ -185,7 +185,6 @@ void Boiler::register_mqtt_ha_config_ww() {
|
|||||||
// send stuff to the Web UI
|
// send stuff to the Web UI
|
||||||
void Boiler::device_info_web(JsonArray & root) {
|
void Boiler::device_info_web(JsonArray & root) {
|
||||||
// fetch the values into a JSON document
|
// fetch the values into a JSON document
|
||||||
// DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_LARGE);
|
|
||||||
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
|
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
|
||||||
JsonObject json = doc.to<JsonObject>();
|
JsonObject json = doc.to<JsonObject>();
|
||||||
if (!export_values_main(json)) {
|
if (!export_values_main(json)) {
|
||||||
@@ -234,6 +233,7 @@ void Boiler::device_info_web(JsonArray & root) {
|
|||||||
if (!export_values_ww(json)) { // append ww values
|
if (!export_values_ww(json)) { // append ww values
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ww
|
// ww
|
||||||
print_value_json(root, F("wWSelTemp"), nullptr, F_(wWSelTemp), F_(degrees), json);
|
print_value_json(root, F("wWSelTemp"), nullptr, F_(wWSelTemp), F_(degrees), json);
|
||||||
print_value_json(root, F("wWSetTemp"), nullptr, F_(wWSetTemp), F_(degrees), json);
|
print_value_json(root, F("wWSetTemp"), nullptr, F_(wWSetTemp), F_(degrees), json);
|
||||||
@@ -679,13 +679,11 @@ void Boiler::show_values(uuid::console::Shell & shell) {
|
|||||||
EMSdevice::show_values(shell); // for showing the header
|
EMSdevice::show_values(shell); // for showing the header
|
||||||
|
|
||||||
// fetch the values into a JSON document
|
// fetch the values into a JSON document
|
||||||
// DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_LARGE);
|
|
||||||
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
|
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
|
||||||
JsonObject json = doc.to<JsonObject>();
|
JsonObject json = doc.to<JsonObject>();
|
||||||
if (!export_values_main(json)) {
|
if (!export_values_main(json)) {
|
||||||
return; // empty
|
return; // empty
|
||||||
}
|
}
|
||||||
// doc.shrinkToFit();
|
|
||||||
|
|
||||||
print_value_json(shell, F("heatingActive"), nullptr, F_(heatingActive), nullptr, json);
|
print_value_json(shell, F("heatingActive"), nullptr, F_(heatingActive), nullptr, json);
|
||||||
print_value_json(shell, F("tapwaterActive"), nullptr, F_(tapwaterActive), nullptr, json);
|
print_value_json(shell, F("tapwaterActive"), nullptr, F_(tapwaterActive), nullptr, json);
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ void Switch::publish_values(JsonObject & json, bool force) {
|
|||||||
|
|
||||||
// export values to JSON
|
// export values to JSON
|
||||||
bool Switch::export_values(JsonObject & json) {
|
bool Switch::export_values(JsonObject & json) {
|
||||||
|
|
||||||
if (Helpers::hasValue(flowTemp_)) {
|
if (Helpers::hasValue(flowTemp_)) {
|
||||||
char s[7];
|
char s[7];
|
||||||
json["activated"] = Helpers::render_value(s, activated_, EMS_VALUE_BOOL);
|
json["activated"] = Helpers::render_value(s, activated_, EMS_VALUE_BOOL);
|
||||||
@@ -148,12 +147,12 @@ void Switch::register_mqtt_ha_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// message 0x9B switch on/off
|
// message 0x9B switch on/off
|
||||||
void Switch::process_WM10SetMessage(std::shared_ptr<const Telegram> telegram){
|
void Switch::process_WM10SetMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
changed_ |= telegram->read_value(activated_, 0);
|
changed_ |= telegram->read_value(activated_, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// message 0x9C holds flowtemp and unknown statusvalue
|
// message 0x9C holds flowtemp and unknown status value
|
||||||
void Switch::process_WM10MonitorMessage(std::shared_ptr<const Telegram> telegram){
|
void Switch::process_WM10MonitorMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
changed_ |= telegram->read_value(flowTemp_, 0); // is * 10
|
changed_ |= telegram->read_value(flowTemp_, 0); // is * 10
|
||||||
changed_ |= telegram->read_value(status_, 2);
|
changed_ |= telegram->read_value(status_, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user