Report configured BMS source when disconnected
This commit is contained in:
@@ -465,8 +465,12 @@ void buildStatusDocument(JsonDocument& doc) {
|
|||||||
battery["cell_max_voltage"] = bmsData.cellMaxVoltage;
|
battery["cell_max_voltage"] = bmsData.cellMaxVoltage;
|
||||||
battery["cell_delta_mv"] = bmsData.cellDeltaMv;
|
battery["cell_delta_mv"] = bmsData.cellDeltaMv;
|
||||||
battery["cells_valid"] = bmsData.cellsValid;
|
battery["cells_valid"] = bmsData.cellsValid;
|
||||||
|
} else {
|
||||||
|
if (appConfig.bms.enabled && appConfig.bms.address.length() > 0) {
|
||||||
|
battery["source"] = "jbd_bms";
|
||||||
} else {
|
} else {
|
||||||
battery["source"] = "unconfigured";
|
battery["source"] = "unconfigured";
|
||||||
|
}
|
||||||
battery["connected"] = false;
|
battery["connected"] = false;
|
||||||
battery["soc"] = 0;
|
battery["soc"] = 0;
|
||||||
battery["voltage"] = 0;
|
battery["voltage"] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user