Skip to content

Commit

Permalink
Display efficiency measuremnt for Huawei AC charger in % in web inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
philippsandhaus committed Oct 20, 2023
1 parent b833d5a commit b159c31
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/WebApi_Huawei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void WebApiHuaweiClass::getJsonData(JsonObject& root) {
root[F("input_temp")]["u"] = "°C";
root[F("output_temp")]["v"] = rp->output_temp;
root[F("output_temp")]["u"] = "°C";
root[F("efficiency")]["v"] = rp->efficiency;
root[F("efficiency")]["v"] = rp->efficiency * 100;
root[F("efficiency")]["u"] = "%";

}
Expand Down
2 changes: 1 addition & 1 deletion src/WebApi_ws_Huawei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void WebApiWsHuaweiLiveClass::generateJsonResponse(JsonVariant& root)
root[F("input_temp")]["u"] = "°C";
root[F("output_temp")]["v"] = rp->output_temp;
root[F("output_temp")]["u"] = "°C";
root[F("efficiency")]["v"] = rp->efficiency;
root[F("efficiency")]["v"] = rp->efficiency * 100;
root[F("efficiency")]["u"] = "%";

}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/HuaweiView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</tr>
<tr>
<th scope="row">{{ $t('huawei.efficiency') }}</th>
<td style="text-align: right">{{ huaweiData.efficiency.v.toFixed(3) }}</td>
<td style="text-align: right">{{ huaweiData.efficiency.v.toFixed(1) }}</td>
<td>{{ huaweiData.efficiency.u }}</td>
</tr>
</tbody>
Expand Down

0 comments on commit b159c31

Please sign in to comment.