mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 03:56:57 +03:00
Add GJ (gigajoule) as an energy meter unit (#2114)
Some district heating meters are displaying their values in GJ and Home Assistant is also capable of accepting heating values in this format.
This commit is contained in:
@@ -156,6 +156,9 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
else if (toUpper(splitted[1]) == "ENERGY_MWH") {
|
||||
mqttServer_setMeterType("energy", "MWh", "h", "MW");
|
||||
}
|
||||
else if (toUpper(splitted[1]) == "ENERGY_GJ") {
|
||||
mqttServer_setMeterType("energy", "GJ", "h", "GJ/h");
|
||||
}
|
||||
}
|
||||
|
||||
if ((toUpper(splitted[0]) == "CLIENTID") && (splitted.size() > 1))
|
||||
|
||||
@@ -654,6 +654,7 @@ textarea {
|
||||
<option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
|
||||
<option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
|
||||
<option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
|
||||
<option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h)</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>$TOOLTIP_MQTT_MeterType</td>
|
||||
|
||||
Reference in New Issue
Block a user